| Transformation {rearrr} | R Documentation |
Transformation
Description
Container for the type of transformation used in
Pipeline.
Note: For internal use.
Public fields
nameName of transformation.
fnTransformation function.
argslistof arguments for`fn`.group_colsNames of columns to group
data.frameby before applying`fn`.When
`NULL`, thedata.frameis not grouped.
Methods
Public methods
Method new()
Initialize transformation.
Usage
Transformation$new(fn, args, name = NULL, group_cols = NULL)
Arguments
fnTransformation function.
argslistof arguments for`fn`.nameName of transformation.
group_colsNames of columns to group
data.frameby before applying`fn`.When
`NULL`, thedata.frameis not grouped.
Method apply()
Apply the transformation to a data.frame.
Usage
Transformation$apply(data)
Arguments
datadata.frame.A grouped
data.framewill first be ungrouped. If`group_cols`is specified, it will then be grouped by those columns.
Returns
Transformed version of `data`.
Method print()
Print an overview of the transformation.
Usage
Transformation$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
Transformation$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
See Also
Other transformation classes:
FixedGroupsTransformation,
GeneratedTransformation