ymdhTOjul | R Documentation |
Converts YYYYMMDDHH or YYYYMMDD dates to Julian dates.
ymdhTOjul( YYYYMMDDHH, origin = c(month = 1, day = 1, year = 2000))
YYYYMMDDHH |
A character vector (or its factor equivalent) of dates in the form YYYYMMDDHH or YYYYMMDD, in which YYYY specifies the year, MM the month, DD the day, and (optionally) HH the hour. |
origin |
A named vector specifying the month, day, and year for the
origin of the Julian dates. The default is
|
Requires the chron
library.
A vector of Julian dates corresponding to YYYYMMDDHH.
The vector has "origin"
and "dropHour"
attributes which give the origin for the Julian output and
indicate whether or not the original format included the hour.
dateCheck,julTOymdh
data(ensBMAtest) julianVdates <- ymdhTOjul(ensBMAtest$vdate) all.equal( julTOymdh(julianVdates), as.character(ensBMAtest$vdate)) all.equal( ymdhTOjul(ensBMAtest$idate), julianVdates-2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.