R/findDate.R
findDate.Rd
Finds the date corresponding a row index of a matrix given the date (origin) of the first row
findDate(
k,
origin = "1961-1-1",
data.frame = TRUE,
decimal = FALSE,
character = FALSE
)
integer or decimal value corresponding to number of days since origin
origin date. See also extractdays
logical variable. If TRUE
(default) the date is returned as data frame (like data
in extractyears
), otherwise it is returned as character or POSIXct.
logical variable. If FALSE
(default) k is integer and starts from 1, otherwise is consider as the decimal julian day since origin
(deprecated)
logical variable. It is used if data.frame
is FALSE
, if it is FALSE
, the date is returned as POSIXct, otherwise it is a character in the following form: YYYY-MM-DD
the date(s) corresponding to k
under different formats
It uses functions of time
package. It works like an inverse functions of extractdays
.
If k
is a vector, the function returns several dates for each element of k
findDate <- findDate(100,origin="1961-1-1",data.frame=FALSE,character=TRUE)