# NOT RUN {
days <- c(0, 1, 365)
Dates <- as.Date1970(days)
# }
# NOT RUN {
all.equal(c('1970-01-01', '1970-01-02', '1971-01-01'),
as.character(Dates))
# }
# NOT RUN {
# }
# NOT RUN {
all.equal(days, as.numeric(Dates))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab