View source: R/datetime_utils.R
year | R Documentation |
Extract numeric years from a Date, POSIXct or POSIXlt vector.
year(x)
x |
Date, POSIXct or POSIXlt vector |
A numeric vector.
Sys.Date()
year(Sys.Date())
year(as.POSIXct(Sys.Date()))
year(as.POSIXlt(Sys.Date()))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.