How can I convert a column of integers as dates:
DATE PRCP 1: 19490101 25 2: 19490102 5 3: 19490118 18 4: 19490119 386 5: 19490202 38
I would advise you to use the lubridate package:
require(lubridate) df[, DATE := ymd(DATE)] df[, c("Day", "Month", "Year") := list(day(DATE), month(DATE), year(DATE))] df[, DATE := NULL]