index_detach: Detach index of a 'zoo' object

Description Usage Arguments Value Examples

View source: R/index_detach.R

Description

Detach the index of a zoo object to be seperated values of year/month/day/hour/minute/second, and return a data frame containing these columns.

Usage

1
2
3
4
index_detach(x, ...)

## S3 method for class 'zoo'
index_detach(x, nfield = 2, ...)

Arguments

x

a object.

...

further arguments.

nfield

numeric. Number of fields of time to retain.

Value

a data frame.

Examples

1
2
3
4
5
6
7
x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1
x <- zoo(rnorm(5), x.Date)
index_detach(x, 3)

y.POSIXct <- ISOdatetime(2003, 02, c(1, 3, 7, 9, 14), 0, 0, 0)
y <- zoo(rnorm(5), y.POSIXct)
index_detach(y, 6)

ran-ran/zoocat documentation built on July 5, 2017, 8:41 p.m.