Learn R Programming

zoocat (version 0.2.0.1)

order_col: Order a zoocat object by column

Description

Order a "zoocat" object by column based on the values in the cattr table.

Usage

order_col(x)

Arguments

x

the object.

Examples

Run this code
# NOT RUN {
x <- matrix(1 : 20, nrow = 5)
colAttr <- data.frame(month = c(2, 3, 5, 6), name = c(rep('xxx', 3), 'yyy'))
zm <- zoomly(x, order.by = 1991 : 1995, colattr = colAttr)
order_col(zm)
zm <- zm[, c(4, 2, 3, 1)]
order_col(zm)

# }

Run the code above in your browser using DataLab