as_year | R Documentation |
as_year()
is a generic for coercing input in to <grates_year>
.
as_year(x, ...)
## Default S3 method:
as_year(x, ...)
## S3 method for class 'Date'
as_year(x, ...)
## S3 method for class 'POSIXt'
as_year(x, ...)
## S3 method for class 'character'
as_year(x, ...)
## S3 method for class 'factor'
as_year(x, ...)
x |
R object. Character input is first parsed using POSIXct and POSIXlt are converted with the timezone respected. |
... |
Only used For character input where additional arguments are passed through
to |
A <grates_year>
object.
as.Date()
as_year(Sys.Date())
as_year(as.POSIXct("2019-03-04 01:01:01", tz = "America/New_York"), interval = 2)
as_year("2019-05-03")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.