Created
July 24, 2010 18:26
-
-
Save ajdamico/488879 to your computer and use it in GitHub Desktop.
calculate your ten thousandth day on earth with R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#replace my birthday with yours | |
birthday <- strptime(c("8.18.1982"), format = "%m.%d.%Y", tz="EST") | |
#r counts everything in seconds, so this code multiplies by 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day. | |
days <- function(u) { | |
x <- u * 60 * 60 * 24 | |
return(x) | |
} | |
#change these numbers to whichever days you'd like to see, separated by commas | |
birthday + days( c( 10000 , 15000 , 20000 ) ) - 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment