add.selection: Adds selection criteria to a hypercube

Description Usage Arguments Value Author(s) See Also Examples

Description

This function adds further selection criteria to a hypercube. The cube itself will not be changed. The selection criteria only affect the data that will be shown when printing the cube. Note that selection criteria will be applied before aggregating the data.

Usage

1
add.selection(x, criteria)

Arguments

x

Hypercube for which the selection criteria will be defined.

criteria

A list of selection criteria.

Value

Returns a Cube object with the added selection criteria.

Author(s)

Michael Scholz michael.scholz@th-deg.de

See Also

Cube remove.selection add.aggregation

Examples

1
2
3
4
5
6
7
8
data("sales")
print(str(sales))
cube = generateCube(sales, columns = list(time = c("month", "year"),
      location = c("state"), product = "product"), valueColumn = "amount")
cube = add.selection(cube, criteria = list(state = c("CA", "FL")))
cube
cube = add.selection(cube, criteria = list(state = c("TX")))
cube

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