as.zoocat: Coercing objects to Class 'zoocat'

Description Usage Arguments Value Examples

View source: R/as.zoocat.R

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)

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