remove.aggregation: Removes aggregations from a hypercube

Description Usage Arguments Value Author(s) See Also Examples

Description

This function removes aggregations from a hypercube. The cube itself will not be changed. The aggregation only affect the data that will be shown when printing the cube.

Usage

1
remove.aggregation(x, dimensions = NA, last = FALSE)

Arguments

x

Hypercube from which the aggregation will be removed.

dimensions

A vector of dimensions for which the aggregations will be removed.

last

Should the last aggregation be removed? If this parameter is set TRUE, the dimension vector will be ignored.

Value

Returns a Cube object with the added aggregation.

Author(s)

Michael Scholz michael.scholz@th-deg.de

See Also

Cube add.aggregation remove.selection

Examples

1
2
3
4
5
6
7
8
9
data("sales")
cube = generateCube(sales, columns = list(time = c("month", "year"),
      location = c("state"), product = "product"), valueColumn = "amount")
cube = add.aggregation(cube, dimensions = c("month", "year"), fun = "sum")
cube
cube = add.aggregation(cube, dimensions = "year", fun = "sum")
cube
cube = remove.aggregation(cube, dimensions = "year")
cube

hypercube documentation built on March 26, 2020, 7:52 p.m.