[R] Covwerting a Date variable from character to Date
Admire Tarisirayi Chirume
@tch|rume @end|ng |rom gm@||@com
Thu Sep 29 17:52:30 CEST 2022
I kindly request for assistance to convert a Date variable from a character
to be recognised as a date. I used the following command lines.
inflation[,1:2 ] #subsetting the dataframe
cpi = CPI,
#subsetting data April 2020 to current
inflation.2$cpi <- as.numeric(as.character(inflation.2$cpi))
* format(as.Date(inflation.2$period), "%Y-%m")*
Having ran the command lines above, the variable period in the attached csv
file remains being read as a character variable. Kindly assist.
More information about the R-help