I'm sorry for bothering with this but can't find solution to this.
I have a data.frame with column name date:
str(df$date)
Factor w/ 360 levels "1982-11-30","1982-12-31",..: 1 4 7 10 13 16 19 22 25 28 ...
class(a)
[1] "factor"
I would like to convert this to numeric values: from: "1982-11-30" to 19821130 or else.
EDIT:
Initially I have had this in numeric format and converted to factor as following:
date <- as.Date(as.character(df$date_num),format="%Y%m%d")
So how to reverse this?