Learn R Programming

zoocat (version 0.2.0.1)

melt_month: Translate zoomly objects to yearmon format

Description

Melt the month information of a zoomly object into the index, and return a "zoo" object with the index of "yearmon" class.

Usage

melt_month(x)

Arguments

x

a zoomly object.

Examples

Run this code
# NOT RUN {
x <- matrix(1 : 20, nrow = 5)
zm <- zoomly(x, order.by = 1991 : 1995, 
             colattr = data.frame(month = c(2, 3, 5, 6)))
melt_month(zm)

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)
melt_month(as.zoomly(zc))

# }

Run the code above in your browser using DataLab