| PivotData | R Documentation |
The PivotData class stores all of the data frames associated with a pivot table. Each data frame can have a set of associated "totals" data frames, which are used to enable the "value" calculation type.
R6Class object.
countThe number of named data frames in the pivot table (excluding totals/aggregate data frames).
defaultDataThe default data frame in the pivot table.
defaultNameThe name of the default data frame in the pivot table.
new()Create a new 'PivotData' object.
PivotData$new(parentPivot = NULL)
parentPivotThe pivot table that this 'PivotData' instance belongs to.
A new 'PivotData' object.
addData()Add a data frame to the pivot table, specifying a name that can be used later to easily retrieve it or refer to it.
PivotData$addData(dataFrame = NULL, dataName = NULL)
dataFrameThe data frame to add to the pivot table.
dataNameThe name to assign to this data frame in the pivot table. If no name is specified, then the name of the data frame variable will be used.
No return value.
getData()Retrieve the data frame with the specified name.
PivotData$getData(dataName = NULL)
dataNameThe name that was assigned to the data frame when it was added to the pivot table.
A data frame.
isKnownData()Check if a data frame exists with the specified name.
PivotData$isKnownData(dataName = NULL)
dataNameThe name that was assigned to the data frame when it was added to the pivot table.
'TRUE' if a data frame exists with the specified name, 'FALSE' otherwise.
addTotalData()Add pre-calculated totals/aggregate data to the pivot table.
PivotData$addTotalData(dataFrame = NULL, dataName = NULL, variableNames = NULL)
dataFrameThe data frame to add to the pivot table.
dataNameThe name of the associated data frame in the pivot table which these totals relate to.
variableNamesA character vector specifying the names of the variables which these totals are grouped by.
No return value.
countTotalData()Count the number of data frames containing total/aggregate data that exist in the pivot table associated with a specific named data frame.
PivotData$countTotalData(dataName = NULL)
dataNameThe name of the associated data frame in the pivot table which these totals relate to.
The number of total/aggregate data frames that exist in the pivot table associated with the specified data frame name.
getTotalData()Retrieve pre-calculated totals/aggregate data from the pivot table.
PivotData$getTotalData(dataName = NULL, variableNames = NULL)
dataNameThe name of the associated data frame in the pivot table which these totals relate to.
variableNamesA character vector specifying the names of the variables which the totals are grouped by.
A data frame.
asList()Return the contents of this object as a list for debugging.
PivotData$asList()
A list of various object properties.
asJSON()Return the contents of this object as JSON for debugging.
PivotData$asJSON()
A JSON representation of various object properties.
clone()The objects of this class are cloneable with this method.
PivotData$clone(deep = FALSE)
deepWhether 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.