xts
and back, without
losing any attributes of the original format.## S3 method for class 'xts':
as.xts(x,...)
## S3 method for class 'timeSeries':
as.xts(x, dateFormat="POSIXct", FinCenter, recordIDs,
title, documentation, ...)
## S3 method for class 'its':
as.xts(x,...)
## S3 method for class 'zoo':
as.xts(x, order.by=index(x), frequency=NULL, ...)
## S3 method for class 'ts':
as.xts(x, dateFormat,...)
## S3 method for class 'data.frame':
as.xts(x, order.by, dateFormat="POSIXct",
frequency=NULL, ...)
## S3 method for class 'matrix':
as.xts(x, order.by, dateFormat="POSIXct",
frequency=NULL, ...)
xts
.It is possible with a call to as.xts
to
convert objects of class timeSeries
, ts
,
its
, matrix
, data.frame
, and zoo
.
Additional name=value pairs may be passed to the function
to be added to the new object. A special print.xts method
will assure that the attributes are hidden from view, but will
be available via R's standard attr
function.
The returned object will preserve all relevant attribute/slot
data within itself, allowing for temporary conversion to use
zoo and xts compatible methods. A call to reclass
returns the object to its original class, with all original
attributes intact - unless otherwise changed.
It should be obvious, but any attributes added via the ...argument will not be carried back to the original data object, as there would be no available storage slot/attribute.
xts