I have the following dataframe:
structure(list(mesos = c("abr22", "ag22", "des22"), Anual_2022 = c(66.8,
66.8, 66.8), decil1 = c(100.1, 100.1, 100.1)), row.names = c(NA,
-3L), class = c("tbl_df", "tbl", "data.frame"))
and I would like to convert mesos
to date format.
So far, I have tried:
taxa_inflacio_ESP_mesos2022$mesos <- lubridate::parse_date_time(taxa_inflacio_ESP_mesos2022$mesos , orders = c("%m%y", "%m/%Y"))
taxa_inflacio_ESP_mesos2022$mesos<- ymd(taxa_inflacio_ESP_mesos2022$mesos)
But not all the values of mesos
are converted to date format.