I'm looking for a straightforward way to convert all of the variables in a data frame which begin with 'date' to dates using lubridate::dmy()
(they are currently characters with the dmy format).
I had thought there would be done with mutate_if or mutate_each in dplyr
but I am struggling to figure out how.
You can use
mutate_at()
or use
mutate_if
to mutate all date columns to dmy. Usingis.Date
fromlubridate
.