0

I have a data frame whose one column is already in "POSIXct" "POSIXt" format. The data is for a total of 3 years, for every day and every hour of the day. So my data frame has a total of 24*365*3 (approx, because of leap years) rows and it looks like below:

290 2019-01-13 01:00:00   64700    44.02               1
291 2019-01-13 02:00:00   63700    37.03               1
292 2019-01-13 03:00:00   59900    26.54               1
293 2019-01-13 04:00:00   57100    23.25               1
294 2019-01-13 05:00:00   56300    20.01               1
295 2019-01-13 06:00:00   57000    40.06               1
296 2019-01-13 07:00:00   58050    45.86               1
297 2019-01-13 08:00:00   59700    26.23               1
298 2019-01-13 09:00:00   62000    48.78               1
299 2019-01-13 10:00:00   64500    49.47               1
300 2019-01-13 11:00:00   65650    49.85               1

I want to create a ts object from this. I am looking at the documentation for ts. I understand that I have to put appropriate values for start and end. Most of the examples that I see are only for daily data. How can I do this for hourly data? Thanks for your help!

0 Answers0