Learn R Programming

hypercube (version 0.2.1)

remove.selection: Removes selection criteria from a hypercube

Description

This function removes all selection criteria for the given dimensions. The cube itself will not be changed. The selection criteria only affect the data that will be shown when printing the cube.

Usage

remove.selection(x, dimensions)

Arguments

x

Hypercube for which the selection criteria will be defined.

dimensions

A vector of dimension names for which all selection criteria will be removed.

Value

Returns a Cube object with removed selection criteria.

See Also

Cube add.selection remove.aggregation

Examples

Run this code
# NOT RUN {
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 = remove.selection(cube, dimensions = c("state"))
cube

# }

Run the code above in your browser using DataLab