as.zoocat: Coercing objects to Class 'zoocat'

Description Usage Arguments Value Examples

Description

Coercing objects to class zoocat.

Usage

1
2
3
4
5
6
7
8
as.zoocat(x, ...)

## S3 method for class 'zoomly'
as.zoocat(x, ...)

## S3 method for class 'zoo'
as.zoocat(x, colattr = NULL, variable.name = "variable",
  index.name = "index", ...)

Arguments

x

the object.

...

other arguments passed to methods.

colattr

a data frame the column attribute table for x.

variable.name

the name of the field in the cattr of the output zoocat object to store the variable name.

index.name

the name of the index variable.

Value

a "zoocat" object.

Examples

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

zobj <- zoo(matrix(1:10, nrow = 5), order.by = 11:15)
colnames(zobj) <- c('a', 'b')
as.zoocat(zobj)

zoocat documentation built on May 2, 2019, 10:22 a.m.