zoo (version 0.1-4)

index: Extracting Index From Objects

Description

index is a generic function for extracting the index of an object.

Usage

index(x, ...)

Arguments

x
an object,
...
currently not used.

Details

index is a generic function for extracting the index of objects, currently it has a default method and a method for zoo objects which is the same as the time method for zoo objects.

See Also

time, zoo

Examples

Run this code
x.date <- as.POSIXct(paste("2003-02-", c(1, 3, 7, 9, 14), sep = ""))
x <- zoo(rnorm(5), x.date)
index(x)

x <- matrix(rnorm(10), ncol = 2)
index(x)

Run the code above in your browser using DataCamp Workspace