Description Details Author(s) Examples
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).
Package: | hypercube |
Type: | Package |
Version: | 0.2.1 |
Date: | 2020-02-27 |
License: | GPL-3 |
Depends: | R (>= 3.0), methods |
Michael Scholz michael.scholz@th-deg.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.