get_year | R Documentation |
Get Year, Quarter, Month or Isoweek
get_year(x) get_quarter(x) get_month(x) get_isoweek(x) get_isoyear(x)
x |
a date_xx or any R object that can be coerced to |
If you use lubridate in addition to dint,
you can also use lubridate::year()
, lubridate::month()
and
lubridate::quarter()
with dint objects.
an integer
vector.
lubridate::year()
,
lubridate::month()
,
lubridate::quarter()
x <- date_yq(2016, 2) get_year(x) ## Not run: library(lubridate) year(x) ## End(Not run) x <- date_yq(2016, 2) get_quarter(x) ## Not run: library(lubridate) quarter(x) ## End(Not run) x <- date_yq(2016, 2) get_month(x) ## Not run: library(lubridate) month(x) ## End(Not run) x <- date_yw(2016, 2) get_isoweek(x) get_isoyear(as.Date("2018-01-01")) get_isoyear(as.Date("2016-01-01"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.