Displaying 1 result from an estimated 1 matches for "datenum".
Did you mean:
daten
2004 Jun 07
7
Vectors of years, months, and days to dates?
The interface for dates in R is a little confusing to me.
I want to create a vector of Date objects from vectors of years, months, and
days.
One solution I found is:
years <- c(1991, 1992)
months <- c(1, 10)
days <- c(1, 2)
dates <- as.Date(ISOdate(years, months, days))
But, in this solution the ISOdate function converts the vectors into
characters,
which can cause serious