Hi everybody, I have a 4*4 matrix WD of wind data of the following form:
> WD $date [1] "07.07.2010" "07.07.2010" "07.07.2010" "07.07.2010" $time [1] "00:00:00" "00:10:00" "00:20:00" "00:30:00" $CH1Avg [1] 3.02 3.04 2.94 2.71 I would like to transform the date and time strings in usable numbers for plotting : - Transform "07.07.2010" in 07*24 + 07*31*24 for example - Transform the string of type "12:15:20" in a number equals to 12+15/60+20/3600 I would hence need a function able to look for defined patterns in a list, like aa:bb:cc and evaluate aa+bb/60+cc/3600. Anyone has a idea? Thanks a lot! Cheers Olivier Coupiac [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.