If you saw Hilary Parker‘s awesome post Sunsets in Google Calendar using R and got all excited about it, but have no idea how to use R, fear not. This post will help you go the distance!
First, install R. I myself use MacPorts
, so I did:
$ sudo port install R
which took a while and had a lot of dependencies, but whatevs, it eventually worked…
Next, save Hilary’s createsunsetcal.R file somewhere on your computer.
Open that up and modify it to use your own sunset location and lat/lon coordinates (I used Google Maps and looked at the lat/lon coordinates in the URL to fill in the data I wanted). Save it.
Now, in that same folder, open an R prompt like so and do the following:
… (follow the prompts here, choose a mirror, etc.)
then <control> + d to exit your R session.
Congrats, you should now see a file called
Thanks for the awesome write-up Hilary.
You can download a pre-build R.app
Similar process for homebrew, just
> brew tap homebrew/science
> brew install r
Thanks for the tips gents!