1

The dataset has utc time with microseconds

TIME,DATA1,DATA2
1350359123.325330,661.00,765.00
1350359123.491836,661.00,765.50

However, I am unable to do the utc format conversion and microseconds at the same time.

I have already asked a similar question but that had a different time format.

Community
  • 1
  • 1
shoonya
  • 292
  • 1
  • 10

1 Answers1

4

No need for zoo or xts for the parsing of the time:

R> as.POSIXct(c(1350359123.325330, 1350359123.491836), 
+             origin="1970-01-01", tz="UTC")
[1] "2012-10-16 03:45:23.325330 UTC" "2012-10-16 03:45:23.491836 UTC"
R> 

Now, given POSIXct as time objects, you can create the xts or zoo object for the data part.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725