[R] Best way to Convert String to Time for comparison?

allany allany at cmu.edu
Wed Aug 4 14:43:02 CEST 2010


Hi guys,

I have a large text file with a bunch of Time in "HH:MM" format, what would
be the best way to process it into a Time Object so that I can use
comparisons like (1:00<"1:15") or (13:00>"2:00") to both return true.

Right now if I do a comparison like (3:00 < "1:59") I get a true, but if I
do (3:00 < "2:00") I get false, which is an obvious error.


Thanks,
Allan

 
-- 
View this message in context: http://r.789695.n4.nabble.com/Best-way-to-Convert-String-to-Time-for-comparison-tp2313386p2313386.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list