| FixedGroupsTransformation {rearrr} | R Documentation | 
FixedGroupsTransformation
Description
Container for the type of transformation used in
FixedGroupsPipeline.
Note: For internal use.
Super class
rearrr::Transformation -> FixedGroupsTransformation
Public fields
nameName of transformation.
fnTransformation function.
argslistof constant arguments for`fn`.var_argslistof arguments for`fn`with different values per group.num_groupsNumber of groups that the transformation expects.
apply_arglistofTRUE/FALSEflags indicating whether the transformation should be applied to each of the groups.When
`NULL`, the transformation is applied to all groups.
Methods
Public methods
Method new()
Initialize transformation.
Usage
FixedGroupsTransformation$new(fn, args, var_args, name = NULL)
Arguments
fnTransformation function.
argslistof constant arguments for`fn`.var_argslistof arguments for`fn`with different values per group. Each argument should have a list of values (one per group).By adding
".apply"with a list ofTRUE/FALSEflags, the transformation can be disabled for a specific group.E.g.
list(".apply" = list(TRUE, FALSE, TRUE), ....nameName of transformation.
Method get_group_args()
Get arguments for specific group ID.
Usage
FixedGroupsTransformation$get_group_args(group_id)
Arguments
group_idID of the group to get arguments for.
Returns
list of arguments.
Method apply()
Apply the transformation to a data.frame.
Usage
FixedGroupsTransformation$apply(data)
Arguments
datadata.framewith the expected number of groups.
Returns
Transformed version of `data`.
Method print()
Print an overview of the transformation.
Usage
FixedGroupsTransformation$print(..., indent = 0, show_class = TRUE)
Arguments
...further arguments passed to or from other methods.
indentHow many spaces to indent when printing.
show_classWhether to print the transformation class name.
Returns
The pipeline. To allow chaining of methods.
Method clone()
The objects of this class are cloneable with this method.
Usage
FixedGroupsTransformation$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
See Also
Other transformation classes: 
GeneratedTransformation,
Transformation