Extraiga el año fiscal con R Lubridate
Crearé varias fechas.
library(lubridate)
x <- ymd(c("2012-03-26", "2012-05-04", "2012-09-23", "2012-12-31"))
Puedo extraer el año y el trimestre de estosx
valores
quarter(x, with_year = TRUE, fiscal_start = 10)
[1] 2012.2 2012.3 2012.4 2013.1
Pero parece que no puedo extraersól el año fiscal. Esto no funciona, pero ¿qué será?
year(x, with_year = TRUE, fiscal_start = 10)
Recibo el siguiente mensaje de error:
Error en el año (x, with_year = TRUE, fiscal_start = 10): argumentos no utilizados (with_year = TRUE, fiscal_start = 10)