hypercube-package: Provides functions and methods for organizing data in...

Description Details Author(s) Examples

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

 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

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