dput(head(WorkoutDur20, 5)):
structure(list(Month = structure(3:7, .Label = c("January", "February",
"March", "April", "May", "June", "July", "August", "September",
"October", "November", "December"), class = "factor"), Total_Dur20 = new("Duration",
.Data = c(12942, 19185, 18744, 20855, 18560))), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))
Code is as below:
WorkoutDur20 <- wd20 %>%
group_by(Month) %>%
separate(Time, into = c("hours", "minutes", "seconds"), sep = ":", convert = TRUE) %>%
summarise(Total_Dur20 = duration(hour = sum(hours), minute = sum(minutes), second = sum(seconds)))
WorkoutDur20 <- WorkoutDur20 %>%
mutate(
Month = factor(Month, levels = month.name)
) %>%
arrange(Month)
The graph has already been shared. Is this proper enough for you to help?