as.Date.date_xx | R Documentation |
All dint objects can be coerced to base R Date or Datetime (POSIXct
)
types. The resulting date will always default to the first possible
Date/Datetime in this period.
## S3 method for class 'date_xx' as.POSIXlt(x, tz = "", ...) ## S3 method for class 'date_xx' as.POSIXct(x, tz = "", ...) Sys.date_yq() Sys.date_ym() Sys.date_yw() ## S3 method for class 'date_y' as.Date(x, ...) ## S3 method for class 'date_ym' as.Date(x, ...) ## S3 method for class 'date_yq' as.Date(x, ...) ## S3 method for class 'date_yw' as.Date(x, ...)
x |
any R object |
tz |
time zone specification to be used for the conversion,
if one is required. System-specific (see time zones),
but |
... |
passed on to methods |
If lubridate is loaded, methods for lubridate generics (such as
lubridate::month()
and lubridate::year()
) are also made available by
dint.
An Object of the appropriate base R type (Date
, POSIXct
, or
POSIXlt
)
as.Date(date_yq(2017, 2)) as.POSIXlt(date_yq(2017, 2)) # When coercing to datetime, the default timezone is UTC as.POSIXct(date_yq(2017, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.