tags:

views:

197

answers:

2

Hi,

I would like to import a time-series where the first field indicates a period:

08:00-08:15
08:15-08:30
08:30-08:45

Does R have any features to do this neatly?

Thanks!


Update:

The most promising solution I found, as suggested by Godeke was the cron package and using substring() to extract the start of the interval.

I'm still working on related issues, so I'll update with the solution when I get there.

+2  A: 

CRAN shows a package that is actively updated called "chron" that handles dates. You might want to check that and some of the other modules found here: http://cran.r-project.org/web/views/TimeSeries.html

xts and zoo handle irregular time series data on top of that. I'm not familiar with these packages, but a quick look over indicates you should be able to use them fairly easily by splitting on the hyphen and loading into the structures they provide.

Godeke
zoo was easy :)
tovare
+1  A: 
Peter McMahan