Reputation: 399
I created a data frame, DF.
time <- c("10:00", "11:00", "12:00", "13:00")
temperature <- c("15", "16", "17", "18")
DF <- data.frame(time, temperature)
R views the “time” column as a list of characters. How do I get it too recognize the “time” column as a list of times?
I usually use the following code;
DF$time <- as.hms(DF$time).
However in this case the time column does not include seconds, so that piece of code does not work.
Upvotes: 0
Views: 35