I'll create several dates.
library(lubridate)
x <- ymd(c("2012-03-26", "2012-05-04", "2012-09-23", "2012-12-31"))
I can extract the year and quarter from these x
values.
quarter(x, with_year = TRUE, fiscal_start = 10)
[1] 2012.2 2012.3 2012.4 2013.1
But I can't seem to extract just the fiscal year. This doesn't work, but what will?
year(x, with_year = TRUE, fiscal_start = 10)
I receive the following error message:
Error in year(x, with_year = TRUE, fiscal_start = 10) : unused arguments (with_year = TRUE, fiscal_start = 10)