I\'m working with the London crime dataset which contains dates in an integer format. I melted them and now they have become factors.
factor
For example, \"
\"
One possibility is to use lubridate
lubridate
ss <- factor("X200801") library(lubridate) ymd(paste(sub("X", "", ss), "01", sep = "")) #[1] "2008-01-01"