Package hypercube. December 15, 2017

Similar documents
Package datasets.load

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package kirby21.base

Package fastdummies. January 8, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package Matrix.utils

Package crossword.r. January 19, 2018

Package spark. July 21, 2017

Package editdata. October 7, 2017

Package narray. January 28, 2018

Package bisect. April 16, 2018

Package IATScore. January 10, 2018

Package gtrendsr. August 4, 2018

Package CatEncoders. March 8, 2017

Package repec. August 31, 2018

Package gtrendsr. October 19, 2017

Package comparedf. February 11, 2019

Package validara. October 19, 2017

Package dgo. July 17, 2018

Package splithalf. March 17, 2018

Package projector. February 27, 2018

Package TVsMiss. April 5, 2018

Package jstree. October 24, 2017

Package SEMrushR. November 3, 2018

Package balance. October 12, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package sfc. August 29, 2016

Package catenary. May 4, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package sigqc. June 13, 2018

Package reval. May 26, 2015

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package velox. R topics documented: December 1, 2017

Package sankey. R topics documented: October 22, 2017

Package tidyimpute. March 5, 2018

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package estprod. May 2, 2018

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package calpassapi. August 25, 2018

Package mdftracks. February 6, 2017

Package raker. October 10, 2017

Package lumberjack. R topics documented: July 20, 2018

Package rsppfp. November 20, 2018

Package PCADSC. April 19, 2017

Package fitbitscraper

Package qicharts2. March 3, 2018

Package ipft. January 4, 2018

Package epitab. July 4, 2018

Package sessioninfo. June 21, 2017

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package dkanr. July 12, 2018

Package tm1r. R topics documented: October 30, Type Package

Package mds. April 27, 2018

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package ecoseries. R topics documented: September 27, 2017

Package canvasxpress

Package oasis. February 21, 2018

Package nlgeocoder. October 8, 2018

Package bayeslongitudinal

Package ecotox. June 28, 2018

Package gcite. R topics documented: February 2, Type Package Title Google Citation Parser Version Date Author John Muschelli

Package woebinning. December 15, 2017

Package messaging. May 27, 2018

Package nos. September 11, 2017

Package postgistools

Package CuCubes. December 9, 2016

Package transformr. December 9, 2018

Package readxl. April 18, 2017

Package ggseas. June 12, 2018

Package NFP. November 21, 2016

Package ECctmc. May 1, 2018

Package auctestr. November 13, 2017

Package fst. December 18, 2017

Package strat. November 23, 2016

Package QCAtools. January 3, 2017

Package apastyle. March 29, 2017

Package spelling. December 18, 2017

Package simtool. August 29, 2016

Package io. January 15, 2018

Package collapsibletree

Package samplesizecmh

Package vinereg. August 10, 2018

Package fastrtext. December 10, 2017

Package crossrun. October 8, 2018

Package geniusr. December 6, 2017

Package dyncorr. R topics documented: December 10, Title Dynamic Correlation Package Version Date

Package svalues. July 15, 2018

Package zoomgrid. January 3, 2019

Package dat. January 20, 2018

Package SFtools. June 28, 2017

Package vesselr. R topics documented: April 3, Type Package

Package manet. September 19, 2017

Package statsdk. September 30, 2017

Package rnrfa. April 13, 2018

Package areaplot. October 18, 2017

The scope Package. April 19, 2006

Package tidystats. May 6, 2018

Package MetaLonDA. R topics documented: January 22, Type Package

Package opencage. January 16, 2018

Package ANOVAreplication

Transcription:

Type Package Title Organizing Data in a Hyper Version 0.1.0 Author Michael Scholz Package hyper December 15, 2017 Maintainer Provides methods for organizing data in a hyper (i.e. a multi-dimensional ). Cubes are generated from molten data frames. Each can be manipulated with five operations: rotation (changedimensionorder()), dicing and slicing (add.selection(), remove.selection()), drilling down (add.aggregation()), and rolling up (remove.aggregation()). License GPL-3 Encoding UTF-8 Depends R (>= 3.3.0), stats Imports methods, stringr LazyData TRUE RoxygenNote 6.0.1 NeedsCompilation no Repository CRAN Date/Publication 2017-12-15 09:58:18 UTC R topics documented: hyper-package..................................... 2 add.aggregation....................................... 3 add.selection........................................ 4 as.data.frame.cube..................................... 5 changedimensionorder................................... 6 Cube-class.......................................... 7 Dimension-class....................................... 7 generatecube........................................ 8 remove.aggregation..................................... 9 1

2 hyper-package remove.selection...................................... 10 sales............................................. 11 show,cube-method..................................... 11 show,dimension-method.................................. 12 Index 13 hyper-package Provides methods for organizing data in a hyper Details This package provides methods for organizing data in a hyper Each 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: hyper Type: Package Version: 0.1.0 Date: 2017-12-14 License: GPL-3 Depends: R (>= 3.0), methods # Simple example # More sophisticated example = add.selection(, criteria = list(state = c("al", "TX"))) = add.aggregation(, dimensions = c("month", "year"), fun = "sum")

add.aggregation 3 df = as.data.frame() df add.aggregation Adds an aggregation to a hyper This function adds a further aggregation to a hyper. The itself will not be changed. The aggregation only affect the data that will be shown when printing the. Note that selection criteria will be applied before the aggregating the data. add.aggregation(, dimensions, fun = c("sum", "min", "max", "prod", "mean", "median", "sd", "count")) dimensions fun Hyper for which the selection criteria will be defined. A vector of dimensions that are used in the aggregation. The function that is used for aggregation. Possible functions are sum, prod, min, max, mean, median, sd, and count. Returns a Cube object with the added aggregation. Cube remove.aggregation add.selection = add.aggregation(, dimensions = c("month", "year"), fun = "sum")

4 add.selection add.selection Adds selection criteria to a hyper This function adds further selection criteria to a hyper. The itself will not be changed. The selection criteria only affect the data that will be shown when printing the. Note that selection criteria will be applied before the aggregating the data. add.selection(, criteria) criteria Hyper for which the selection criteria will be defined. A list of selection criteria. Returns a Cube object with the added selection criteria. Cube remove.selection add.aggregation print(str(sales)) = add.selection(, criteria = list(state = c("ca", "FL"))) = add.selection(, criteria = list(state = c("tx")))

as.data.frame.cube 5 as.data.frame.cube Converts the actual view of a to a data frame Converts the actual view of a Cube object to a data frame. All added selections and aggregations will be regarded. Note that selection criteria will be applied before the aggregating the data. ## S3 method for class 'Cube' as.data.frame(x, row.names = NULL, optional = FALSE,...) x The Cube object that will be converted to a data frame. row.names A character vector giving the row names for the data frame. optional Should setting row names and converting column names be optional?... Further parameters that are passed to as.data.frame.table. A molten data frame add.aggregation add.selection = changedimensionorder(, dimensions = c("product", "month", "year", "state")) df = as.data.frame() df

6 changedimensionorder changedimensionorder Changes the order of the dimensions in a given Changes the order of the dimensions in a given changedimensionorder(, dimensions) dimensions Hyper for which the dimension should be re-ordered. Vector of dimensions. The order of the dimensions in this vector defines the order of the dimensions in the. Returns a Cube object. Cube = changedimensionorder(, dimensions = c("product", "month", "year", "state"))

Cube-class 7 Cube-class Class "Cube" Slots Class "Cube" data (array) The data that are represented as hyper. structure (list) The structure of the dimensions of the hyper. view (list) Information about how to build a view for the hyper. This information is stored in a list of Dimension-class objects. Objects from the Class Objects can be created by calls of the form new("cube",...). This S4 class describes Cube objects. generatecube # show Cube definition showclass("cube") Dimension-class Class "Cube" Class "Cube" Slots name (character) The name of the dimension. values (vector) A vector of selected values for this dimension. aggregation (vector) A vector of aggregation functions that will be applied to this dimension.

8 generatecube Objects from the Class Objects can be created by calls of the form new("dimension",...). This S4 class describes Dimension objects. # show Dimension definition showclass("dimension") generatecube Generates a hyper from a given dataframe This function generates a hyper from a given dataframe. The dimensions of the hyper correspond to a set of selected columns from the dataframe. generatecube(data, columns, valuecolumn) data columns valuecolumn A dataframe that is used as source for the hyper. A vector of column names that will form the dimensions of the hyper. The name of the column that provides the values for the cells of the hyper. Returns a Cube object. Cube

remove.aggregation 9 remove.aggregation Removes aggregations from a hyper This function removes aggregations from a hyper. The itself will not be changed. The aggregation only affect the data that will be shown when printing the. remove.aggregation(, dimensions = NA, last = FALSE) dimensions last Hyper from which the aggregation will be removed. A vector of dimensions for which the aggregations will be removed. Should the last aggregation be removed? If this parameter is set TRUE, the dimension vector will be ignored. Returns a Cube object with the added aggregation. Cube add.aggregation remove.selection = add.aggregation(, dimensions = c("month", "year"), fun = "sum") = add.aggregation(, dimensions = "year", fun = "sum")

10 remove.selection = remove.aggregation(, dimensions = "year") remove.selection Removes selection criteria from a hyper This function removes all selection criteria for the given dimensions. The itself will not be changed. The selection criteria only affect the data that will be shown when printing the. remove.selection(, dimensions) dimensions Hyper for which the selection criteria will be defined. A vector of dimension names for which all selection criteria will be removed. Returns a Cube object with removed selection criteria. Cube add.selection remove.aggregation print(str(sales)) = add.selection(, criteria = list(state = c("ca", "FL"))) = remove.selection(, dimensions = c("state"))

sales 11 sales Sales of books A dataset containing 2,500 sales of 4 books in different states and countries. sales Format A data fram with 2500 rows and 7 variables: month month as number year year as number state abbreviation of the state as character country country as character product name of the product as character unit number of sold products amount amount of sales Source Synthetic dataset show,cube-method Shows a Cube object Shows the actual view of a Cube object. All added selections and aggregations will be regarded. Note that selection criteria will be applied before the aggregating the data. ## S4 method for signature 'Cube' show(object) object The Cube object

12 show,dimension-method Cube show,dimension-method Shows a Dimension object Shows a Dimension object ## S4 method for signature 'Dimension' show(object) object The Dimension object Cube @view[[1]]

Index Topic classes Cube-class, 7 Dimension-class, 7 Topic datasets sales, 11 Topic data hyper-package, 2 Topic hyper, hyper-package, 2 Topic hyperdimensional hyper-package, 2 add.aggregation, 3, 4, 5, 9 add.selection, 3, 4, 5, 10 as.data.frame.cube, 5 as.data.frame.table, 5 changedimensionorder, 6 Cube, 3, 4, 6, 8 10, 12 Cube-class, 7 Dimension-class, 7 generatecube, 7, 8 hyper (hyper-package), 2 hyper-package, 2 remove.aggregation, 3, 9, 10 remove.selection, 4, 9, 10 sales, 11 show,cube-method, 11 show,dimension-method, 12 13