PivotBatch | R Documentation |
The 'PivotBatch' class represents one combination of data, variables and calculations that are needed when calculating the values of cells in a pivot table.
R6Class
object.
The combination of data name and variable names defines a batch. When the batch is calculated, the calculations specified in the batch are evaluated against the specified data, with the data being grouped by the variables specified in the batch. Individual result values can then be retrieved from the batch. See the "Performance" vignette for details.
batchId
The unique identifier for the batch.
batchName
The unique name of the batch.
compatibleCount
The number of pivot cell calculations that this batch supports.
evaluated
TRUE if this batch has been evaluated.
results
The results (a data frame) of the evaluation of the batch
asString
A text description of the batch.
new()
Create a new 'PivotBatch' object.
PivotBatch$new( parentPivot = NULL, batchId = 0, dataName = NULL, variableNames = NULL, values = NULL, calculationName = NULL, calculationGroupName = NULL )
parentPivot
The pivot table that this 'PivotBatch' instance belongs to.
batchId
The unique identifier for the batch.
dataName
The name of the data frame (as specified in 'pt$addData()') that this batch relates to.
variableNames
Specifies the combination of variable names (i.e. dimensionality) of the batch.
values
A list specifying the distinct list of values for each variable, i.e. 'list(varName1=values1, varName2=values2, ...)'. 'values' is not currently used and does not affect the batch compatibility logic.
calculationName
The first calculation added to this batch. Does not affect the batch compatibility logic.
calculationGroupName
The calculation group of the first calculation added to this batch. Does not affect the batch compatibility logic.
A new 'PivotBatch' object.
isCompatible()
Determine whether a combination of data and variables is compatible with this batch.
PivotBatch$isCompatible(dataName = NULL, variableNames = NULL)
dataName
The name of the data frame (as specified in 'pt$addData()').
variableNames
Specifies the combination of variable names (i.e. dimensionality)..
'TRUE' or 'FALSE'.
addCompatible()
Add a new set of values or a new calculation to the batch. with this batch.
PivotBatch$addCompatible( values = NULL, calculationName = NULL, calculationGroupName = NULL )
values
A list specifying the distinct list of values for each variable, i.e. 'list(varName1=values1, varName2=values2, ...)'. 'values' is not currently used and does not affect the batch compatibility logic.
calculationName
The calculation to add to the batch. Does not affect the batch compatibility logic.
calculationGroupName
The calculation group of the calculation to add to the batch. Does not affect the batch compatibility logic.
No return value.
getCalculationInternalName()
Find the internal name of a calculation in the batch.
PivotBatch$getCalculationInternalName( calculationName = NULL, calculationGroupName = NULL )
calculationName
The name of the calculation to find.
calculationGroupName
The calculation group of the calculation to find.
The internal name of the calculation in the batch.
evaluateBatch()
Carry out grouping and calculations to evaluate the batch.
PivotBatch$evaluateBatch()
No return value.
getSummaryValueFromBatch()
Retrieve one calculation value from the batch, typically for the value of one cell in a pivot table.
PivotBatch$getSummaryValueFromBatch( filters = NULL, calculationName = NULL, calculationGroupName = NULL )
filters
A 'PivotFilters' instance that specifies which value to retrieve. This filters object is a combination of the row, column and calculation filters.
calculationName
The name of the calculation value to retrieve.
calculationGroupName
The calculation group of the calculation to retrieve.
A single calculation value.
clone()
The objects of this class are cloneable with this method.
PivotBatch$clone(deep = FALSE)
deep
Whether to make a deep clone.
# This class should only be created by the pivot table.
# It is not intended to be created outside of the pivot table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.