I've looked at similar questions but not been able to find an exact answer. I provide a reproducible example:
time_dataset<-c("10:40", "15:33", "02:12", "08:01", "13:15")
Currently the above variable is a character variable. However, I want it to be a time variable so that I can add and subtract times and use filters on time (e.g. am vs pm data)
How would I go about doing this. I tried to convert from character to numeric but I got NA results, which I am guessing is to do with the colon.