as.hierarchy: Create hierarchy

Description Usage Arguments Details Value See Also Examples

View source: R/as.hierarchy.R

Description

Create hierarchy

Usage

1
2
3
4
5
6
7
as.hierarchy(x, ...)

## Default S3 method:
as.hierarchy(x, ...)

## S3 method for class 'list'
as.hierarchy(x, ...)

Arguments

x

list which keeps named character vectors (often length 0L) of level key and dependent attributes not listed yet on lower level key.

...

arguments passed to methods.

Details

You generally won't need to use that function directly, but use as.dimension that takes a list of (possibly named) hierarchies inputs.

Value

hierarchy class object.

See Also

hierarchy, level, dimension, data.cube

Examples

1
2
3
4
5
6
7
time.calendar = as.hierarchy(list(
  year = character(),
  quarter = character(),
  month = character(),
  date = c("year","quarter","month")
))
str(time.calendar)

jangorecki/data.cube documentation built on Aug. 22, 2019, 4:15 p.m.