[R] Raw epoch time from XTS

Noah Silverman noahsilverman at ucla.edu
Sat Aug 20 09:44:28 CEST 2011


Hi,

I have a very large data set stored as an xts object.

xts is very nice about showing row labels as "human readable" dates and times.

I want the actual epoch values that are stored internally.  The only way I can find to access them is one-at-a-time using the internal function: xcoredata()

Calling this in an entire column, the "R" way doesn't work.  It will only return a single value.  Calling it in a loop for each row works but is painfully slow.

Since the epoch is stored internally, there must be some way to just grab it as a vector.  Does anyone know how?

Thanks!

--
Noah Silverman
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095



More information about the R-help mailing list