I have a dataset, df that is mixed with minutes as well as seconds. How would I convert this column to seconds only?
duration group
5 1
1.5 2
5.2 3
1 4
0 5
I would like this output:
duration group
5 1
90 2
312 3
1 4
0 5
I have tried:
library(dplyr)
library(lubridate)
df % summarize ((df$duration) units = "secs")
I am not sure how to put this together,