I have a list of times in a basketball game. Here are some sample time values to show how they're stored: "11:44.0"
, "10:03.0"
, "8:35.0"
, "6:19.0"
, "0:49.9"
, "0:03.9"
(Minutes - no leading 0):(Seconds - with leading 0).(Tenths of a second)
It responds well to the format %M:%OS, but I end up with a whole date to go with what was just timer data. This is inconvenient mostly because it looks bad (if any graphs or tables autogenerate to include the date), and if I'm working on it over multiple days, I'll have to make sure all my values have the same date in order to subtract them properly from each other.
> strptime("0:49.9", format = "%M:%OS")
[1] "2018-08-13 00:00:49.9 EDT"
I want to keep it in a time format so it's easy to manipulate. It seems that methods of truncating (like strptime
's format
) turn it into a string, and I don't think the times
class from chron
handles milliseconds (or tenths of a second, for my case).