Convert calendar date to integer day from a reference date (ref).
ref
dateToDay(date, ref = NULL)
A date or vector of dates to convert to days.
Reference date.
Numeric value(s) of days from ref.
# NOT RUN { x <- c("2018-01-01", "2018-02-01") dateToDay(x, x[1]) # }
Run the code above in your browser using DataLab