Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
calculate your ten thousandth day on earth with R
#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
#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
You can’t perform that action at this time.