indexClass {xts} | R Documentation |
Generic functions to extract and replace the class of the index of an xts object.
indexClass(x) indexClass(x) <- value convertIndex(x,value)
x |
xts object |
value |
desired new class. See details |
It is possible to view and set the class of the time-index
of a given xts
object via the indexClass
function.
The specified format must be a character string containing
one of the following: Date
, POSIXct
,
chron
, yearmon
, yearqtr
or timeDate
.
convertIndex
returns a modified xts
object, and
does not alter the original.
Changing the index type may alter the behavior of xts functions expecting a different index, as well as the functionality of additional methods. Use with caution.
Jeffrey A. Ryan