hypercube-package {hypercube} | R Documentation |
Provides functions and methods for organizing data in hypercubes
Description
This package provides methods for organizing data in a hypercube Each cube can be manipulated with five operations rotation (changeDimensionOrder), dicing and slicing (add.selection, remove.selection), drilling down (add.aggregation), and rolling up (remove.aggregation).
Details
Package: | hypercube |
Type: | Package |
Version: | 0.2.1 |
Date: | 2020-02-27 |
License: | GPL-3 |
Depends: | R (>= 3.0), methods |
Author(s)
Michael Scholz michael.scholz@th-deg.de
Examples
# Simple example
data("sales")
cube = generateCube(sales, columns = list(time = c("month", "year"),
location = c("state"), product = "product"), valueColumn = "amount")
cube
# More sophisticated example
data("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("AL", "TX")))
cube = add.aggregation(cube, dimensions = c("month", "year"), fun = "sum")
cube
df = as.data.frame(cube)
df
[Package hypercube version 0.2.1 Index]