cattr: Getting or setting the column attributes table of a 'zoocat'...

Description Usage Arguments Value Examples

Description

Getting or setting the column attributes table of a "zoocat" object. Using cattr(x) <- value can translate a "zoo" object to a "zoocat" object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cattr(x) <- value

## S3 replacement method for class 'zoocat'
cattr(x) <- value

## S3 replacement method for class 'zoo'
cattr(x) <- value

cattr(x)

## S3 method for class 'zoocat'
cattr(x)

Arguments

x

A zoocat or zoo object.

value

The new value.

Value

"cattr(x)" return a data frame.

Examples

1
2
3
4
5
6
7
x <- matrix(1 : 20, nrow = 5)
colAttr <- data.frame(month = c(2, 3, 5, 6), name = 'x')
zc <- zoocat(x, order.by = 1991 : 1995, colattr = colAttr)
cattr(zc)[, 2] <- 'y'

zobj <- zoo(x, order.by = 1991 : 1995)
cattr(zobj) <- colAttr

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