ref {bizdays} | R Documentation |
getdate
Date references are specifically months or years to be used in
getdate
.
Months and years can be specified directly or can be base on a given date.
getdate
returns a date that is in the reference passed.
ref(x, ...) ## S3 method for class 'Date' ref(x, ym = c("month", "year"), ...) ## S3 method for class 'character' ref(x, ...) ## S3 method for class 'numeric' ref(x, ...)
x |
a |
... |
additional arguments If a date ( |
ym |
a character string with the values |
ref(as.Date("2018-01-01"), "month") # refers to 2018-01 ref("2018-01-01", "month") # refers to 2018-01 ref("2018-01-01", "year") # refers to 2018 ref(c("2018-01", "2018-02")) # refers to 2018-01 and 2018-02 ref("2018") # refers to 2018 ref(2010:2018) # refers to all years from 2010 to 2018