I am trying to convert months in the following format:
histdata <- c("198001", "198002", "198003")
I tried:
histdata <- transform(histdata, date = as.Date(as.character(date), "%Y%m"))
but then all data turned to NA.
I would like to find a solution that will return a vector of dates instead.