Hey, I am converting ds column into this format YYYY-MM-DD HH:MM:SS. I want to do this in such a way that time in the columns does not change to 00:00:00.
by this code:
df = data
df$ds <- format(as.POSIXct(as.numeric(as.character(df$ds), "%Y%m%d%H%M%S")))
Its says:
Warning message:
In as.POSIXct(as.numeric(as.character(df$ds), "%Y%m%d%H%M%S")) :
NAs introduced by coercion
Data sample:
ds | y |
---|---|
07/01/2015 1:00 | 5244 |
07/01/2015 2:00 | 5152 |
07/01/2015 3:00 | 4948 |
07/01/2015 4:00 | 4485 |
07/01/2015 5:00 | 4231 |
07/01/2015 6:00 | 4158 |
07/01/2015 7:00 | 4324 |
07/01/2015 8:00 | 4686 |
07/01/2015 9:00 | 5060 |
07/01/2015 10:00 | 5347 |