Sha256: 9a58d0638a0de5764d88532b1b8f00736a5cebb1e7d5625a075e75362cad7bb7

Contents?: true

Size: 1.81 KB

Versions: 110

Compression:

Stored size: 1.81 KB

Contents

# Space Age

Given an age in seconds, calculate how old someone would be on:

   - Earth: orbital period 365.25 Earth days, or 31557600 seconds
   - Mercury: orbital period 0.2408467 Earth years
   - Venus: orbital period 0.61519726 Earth years
   - Mars: orbital period 1.8808158 Earth years
   - Jupiter: orbital period 11.862615 Earth years
   - Saturn: orbital period 29.447498 Earth years
   - Uranus: orbital period 84.016846 Earth years
   - Neptune: orbital period 164.79132 Earth years

So if you were told someone were 1,000,000,000 seconds old, you should
be able to say that they're 31 Earth-years old.

If you're wondering why Pluto didn't make the cut, go watch [this
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).

## Installation
See [this guide](https://github.com/exercism/xr/blob/master/docs/INSTALLATION.md) for instructions on how to setup your local R environment.

## How to implement your solution
In each problem folder, there is a file named `<exercise_name>.R` containing a function that returns a `NULL` value. Place your implementation inside the body of the function.

## How to run tests
Inside of RStudio, simply execute the `test_<exercise_name>.R` script. This can be conveniently done with [testthat's `auto_test` function](https://www.rdocumentation.org/packages/testthat/topics/auto_test). Because exercism code and tests are in the same folder, use this same path for both  `code_path` and `test_path` parameters. On the command-line, you can also run `Rscript test_<exercise_name>.R`.

## Source

Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01)

## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
trackler-2.2.1.104 tracks/r/exercises/space-age/README.md
trackler-2.2.1.103 tracks/r/exercises/space-age/README.md
trackler-2.2.1.102 tracks/r/exercises/space-age/README.md
trackler-2.2.1.101 tracks/r/exercises/space-age/README.md
trackler-2.2.1.100 tracks/r/exercises/space-age/README.md
trackler-2.2.1.99 tracks/r/exercises/space-age/README.md
trackler-2.2.1.98 tracks/r/exercises/space-age/README.md
trackler-2.2.1.97 tracks/r/exercises/space-age/README.md
trackler-2.2.1.96 tracks/r/exercises/space-age/README.md
trackler-2.2.1.95 tracks/r/exercises/space-age/README.md
trackler-2.2.1.94 tracks/r/exercises/space-age/README.md
trackler-2.2.1.93 tracks/r/exercises/space-age/README.md
trackler-2.2.1.92 tracks/r/exercises/space-age/README.md
trackler-2.2.1.91 tracks/r/exercises/space-age/README.md
trackler-2.2.1.90 tracks/r/exercises/space-age/README.md
trackler-2.2.1.89 tracks/r/exercises/space-age/README.md
trackler-2.2.1.88 tracks/r/exercises/space-age/README.md
trackler-2.2.1.87 tracks/r/exercises/space-age/README.md
trackler-2.2.1.86 tracks/r/exercises/space-age/README.md
trackler-2.2.1.85 tracks/r/exercises/space-age/README.md