Learn R Programming

pivottabler (version 0.4.0)

PivotCells: A class that contains the cells from a pivot table.

Description

The PivotCells class contains all of the PivotCell objects that comprise the body of a pivot table.

Usage

PivotCells

Arguments

Value

Object of R6Class with properties and methods relating to the cells of a pivot table.

Format

R6Class object.

Fields

parentPivot

Owning pivot table.

rowGroups

The row data groups that represent the row headings in the pivot table.

columnGroups

The column data groups that represent the column headings in the pivot table.

Methods

Documentation

For more complete explanations and examples please see the extensive vignettes supplied with this package.

new(...)

Create a new set of pivot table cells, specifying the field values documented above.

getCell(r, c))

Get the PivotCell at the specified row and column coordinates in the pivot table.

setCell(r, c, cell))

Set the PivotCell at the specified row and column coordinates in the pivot table.

getCells(specifyCellsAsList=FALSE, rowNumbers=NULL, columnNumbers=NULL, cellCoordinates=NULL)

Retrieve cells by a combination of row and/or column numbers.

findCells(variableNames=NULL, variableValues=NULL, totals="include", calculationNames=NULL, minValue=NULL, maxValue=NULL, exactValues=NULL, includeNull=TRUE, includeNA=TRUE)

Find cells matching the specified criteria.

getColumnWidths())

Retrieve the width of the longest value (in characters) in each column.

asMatrix(rawValue=TRUE))

Get a matrix containing all of the numerical values from the body of the pivot table (for rawValue=TRUE) or all of the formatted (i.e. character) values (for rawValue=FALSE).

asList())

Get a list representation of the pivot table cells.

asJSON()

Get a JSON representation of the pivot table cells.

Examples

Run this code
# NOT RUN {
# This class should only be created by the pivot table.
# It is not intended to be created outside of the pivot table.
# }

Run the code above in your browser using DataLab