as.zoo: Coercion objects to class 'zoo'

Description Usage Arguments Details Value Examples

Description

Coercing objects to class zoo.

Usage

1
2
## S3 method for class 'zoocat'
as.zoo(x, add.colname = TRUE, ...)

Arguments

x

an object.

add.colname

logical. If TRUE, column names will be added automatically.

...

further arguments.

Details

For zoomly and zoocat, the returned zoo object will be added column names automatically.
Note that the result of as.zoo will be a zooreg object if the input x is inherited from zooreg.

Value

A zoo object.

Examples

1
2
3
x <- matrix(1 : 20, nrow = 5)
zc <- zoocat(x, order.by = 1991 : 1995, colattr = data.frame(month=c(2, 3, 5, 6)))
z <- as.zoo(zc)

ran-ran/zoocat documentation built on May 26, 2019, 10:56 p.m.