I'm trying to manipulate data that measures swimming times in different events, but the formatting of the data given is giving me trouble. Some events where times are fast are only measured in seconds and appear as numbers in the format 55.97 for example. Other events with longer times are only in the format mm:ss.00 as character strings, for example 1:58.90. And still some events have a combination of both. I want to be able to manipulate the data to from different types of plots so I need R to understand that 59.99 is right next to 1:00.00. Is this possible?
Here's a simpler version of the data I am working with:
df <- data.frame(Name = c("Swimmer 1","Swimmer 2", "Swimmer 3"), Event.1 = c(22.50,25.90,27.56), Event.2 = c(54.23,"1:01.13",59.54), Event.3 = c("1:41.12","1:58.13","2:03.15") )