I have a df with three columns, day, month and year of type dbl. They ask me to do calculations with the dates, so I would like to have the complete date in the same column.
I have tried:
df %>% as.Date(c(dia, mes, año), format = "%d-%m-%a")
I have a df with three columns, day, month and year of type dbl. They ask me to do calculations with the dates, so I would like to have the complete date in the same column.
I have tried:
df %>% as.Date(c(dia, mes, año), format = "%d-%m-%a")
A more comfortable and secure way is to
ISOdate()
also use the fact that the date is finally in the formatPOSIXt
:> unite(df, FECHA, c(1:3), sep = "-")[,1]