melt: Melt a 'zoocat' Object

Description Usage Arguments Value Examples

Description

Melt a zoocat to a data frame of the long table style, which is similar as in package reshape2.

Usage

1
2
3
## S3 method for class 'zoocat'
melt(data, value.name = "value",
  index.name = indname(data), na.rm = FALSE, ...)

Arguments

data

object to melt.

value.name

name of the column used to store values. It is valid only when a data frame is returned.

index.name

name of the column used to store the index of the zoocat object.

na.rm

as melt in reshape2. Should NA values be removed from the data set?

...

further arguments.

Value

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 = c('x', 'y', 'z', 'a'))
zc <- zoocat(x, order.by = 1991 : 1995, colattr = colAttr)
melt(zc)

zm <- as.zoomly(zc)
melt(zm)

ran-ran/zoocat documentation built on May 26, 2019, 10:56 p.m.