shoonya
shoonya

Reputation: 301

zoo and utc time with microseconds

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.

Upvotes: 1

Views: 335

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368251

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.

Upvotes: 4

Related Questions