coredata.xts {xts} | R Documentation |
Mechanism to extract and replace the core data of an
xts
object.
## S3 method for class 'xts': coredata(x, ...) xcoredata(x,...) xcoredata(x) <- value
x |
an xts object |
value |
non-core attributes to assign |
... |
further arguments [unused] |
Extract coredata of an xts
object - removing
all attributes except dim
and dimnames
and
returning a matrix object with rownames converted from
the index of the xts
object.
xcoredata
is the functional complement to
coredata
, returning all of the attributes
normally removed by coredata
. Its purpose,
along with the replacement function xcoredata<-
is primarily for use by developers using xts
to allow for internal replacement of values
removed during use of non xts-aware functions.
Returns either a matrix object for coredata, or
a list of named attributes.
The replacement functions are called for their side-effects.
Jeffrey A. Ryan
data(sample_matrix) x <- as.xts(sample_matrix, myattr=100) coredata(x) xcoredata(x)