I would like to import a time-series where the first field shows a duration:
08: 00-08: 15 08: 15-08: 30 08: 30-08: 45
Is there any special features to do this smoothly?
Thank you!
Update:
The most promising solution I found, as was the Cron package suggested by Godeke and using the substrings () to extract The beginning of the interval for.
I am still working on related issues, so I will update with the solution when I get it.
then you have been given a letter vector such as c ("08: 00-08 : 15 ", 08: 15-08: 30)
and you want to convert to the internal R data type for stability? Check help files for POSIXt and Sprite.
How about such a function:
importTimes & lt; - Function (t) {T & lt; - Return strsplit (t, "-") (loopy (t, striptime, format = "% H:% M:% S"))}
The character will take the vector, and a list will return the same length, each of which is a POSIXt 2-vector element that gives start and end time (today's date). If you want to standardize that date, you can add a paste ("71-01-01", x)
anywhere inside the function if it is a problem.
Does that help exactly?
Comments
Post a Comment