## ----setup, include = FALSE--------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----------------------------------------------------------------------------- .leap.seconds ## ----------------------------------------------------------------------------- data(nottem) nottem attributes(nottem) ## ----------------------------------------------------------------------------- library(pastecs) # A vector with a "days" time-scale (25 values every 30 days) my_days <- (1:25) * 30 # Convert it to a "years" time-scale, using 23/05/2001 (d/m/Y) as first value daystoyears(my_days, datemin = "23/05/2001", dateformat = "d/m/Y") ## ----------------------------------------------------------------------------- 365.25/12 ## ----------------------------------------------------------------------------- 365.25/7 ## ----------------------------------------------------------------------------- 365.25/48