reset_index_var: Reset index variable of a 'zoocat' object

Description Usage Arguments Value Examples

Description

Reset the index variable of a "zoocat" object to be one of the fields in the cattr table.

Usage

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

## S3 method for class 'zoocat'
reset_index_var(x, index.var, ...)

Arguments

x

the object.

...

other arguments.

index.var

the name of the variable to be set as the index. Must be one of the cattr field.

Value

a "zoocat" object.

Examples

1
2
3
4
5
6
x <- matrix(1 : 20, nrow = 5)
colAttr <- data.frame(month = c(2, 3, 5, 6), name = c(rep('xxx', 3), 'yyy'))
zc <- zoocat(x, order.by = 1991 : 1995, colattr = colAttr)
print(zc)
reset_index_var(zc, 'month')
reset_index_var(zc, 'name')

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