| PivotFilter | R Documentation |
The 'PivotFilter' class represents a single filter condition.
R6Class object.
The filter condition represented by a 'PivotFilter' instance relates to one data frame variable/column and is of the form [ColumnName] IN c(Value1, Value2, Value3, ...). Often in a pivot table, each filter specifies only one data value, as typically each distinct data value exists in a separate row or column. The 'PivotFilter' class contains methods to perform set based operations on filter values when combining filters.
variableNameThe name of the column in the data frame that this filter applies to.
safeVariableNameThe name of the column in the data frame that this filter applies to, surrounded by back-ticks if the name is not legal.
typeEither "ALL", "VALUES" or "NONE". "VALUES" is the most common type and means the data is filtered to a subset of values. "ALL" means there is no filtering, i.e. all values match. "NONE" means there can be no matching values/data.
valuesThe subset of values that this filter matches.
new()Create a new 'PivotFilter' object.
PivotFilter$new(parentPivot, variableName = NULL, type = "ALL", values = NULL)
parentPivotThe pivot table that this 'PivotFilter' instance belongs to.
variableNameThe name of the column in the data frame that this filter applies to.
typeMust be either "ALL", "VALUES" or "NONE". "VALUES" is the most common type and means the data is filtered to a subset of values. "ALL" means there is no filtering, i.e. all values match. "NONE" means there can be no matching values/data.
valuesA single data value or a vector of multiple data values that this filter will match on.
A new 'PivotFilter' object.
intersect()Updates this filter by intersecting the values in this filter with the values from another 'PivotFilter' object.
PivotFilter$intersect(filter)
filterA 'PivotFilter' object.
No return value.
union()Updates this filter by unioning the values in this filter with the values from another 'PivotFilter' object.
PivotFilter$union(filter)
filterA 'PivotFilter' object.
No return value.
replace()Updates this filter by replacing the values in this filter with the values from another 'PivotFilter' object.
PivotFilter$replace(filter)
filterA 'PivotFilter' object.
No return value.
getCopy()Create a copy of this 'PivotFilter' object.
PivotFilter$getCopy()
A copy of this 'PivotFilter' object.
asList()Return the contents of this object as a list for debugging.
PivotFilter$asList()
A list of various object properties.
asJSON()Return the contents of this object as JSON for debugging.
PivotFilter$asJSON()
A JSON representation of various object properties.
asString()Return a representation of this object as a character value.
PivotFilter$asString(includeVariableName = TRUE, seperator = " ")
includeVariableName'TRUE' (default) to include the variable name in the string.
seperatorA character value used when concatenating multiple filter values.
A character summary of various object properties.
clone()The objects of this class are cloneable with this method.
PivotFilter$clone(deep = FALSE)
deepWhether to make a deep clone.
pt <- PivotTable$new()
# ...
PivotFilter$new(pt, variableName="Country", values="England")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.