| GeneratedTransformation | R Documentation |
Container for the type of transformation used in
GeneratedPipeline.
Note: For internal use.
rearrr::Transformation -> GeneratedTransformation
nameName of transformation.
fnTransformation function.
argslist of constant arguments for `fn`.
generatorslist of generator functions
for generating argument values.
apply_generatorGenerator function for deciding whether to apply the transformation to the current group.
new()Initialize transformation.
GeneratedTransformation$new( fn, args, generators, name = NULL, group_cols = NULL )
fnTransformation function.
argslist of constant arguments for `fn`.
generatorsNamed list of functions for generating argument values
for a single call of `fn`.
It is possible to include an apply generator for deciding whether
the transformation should be applied to the current group or not.
This is done by adding a function with the name `.apply` to the `generators` list.
E.g. ".apply" = function(){sample(c(TRUE, FALSE), 1)}.
nameName of transformation.
group_colsNames of columns to group data.frame
by before applying `fn`.
When `NULL`, the data.frame is not grouped.
get_group_args()Get arguments for a group.
GeneratedTransformation$get_group_args()
list of arguments (both constant and generated).
generate_args()Generate arguments for a group with the `generators`.
GeneratedTransformation$generate_args()
list of generated arguments.
Does not include the constant arguments.
print()Print an overview of the transformation.
GeneratedTransformation$print(..., indent = 0, show_class = TRUE)
...further arguments passed to or from other methods.
indentHow many spaces to indent when printing.
show_classWhether to print the transformation class name.
The pipeline. To allow chaining of methods.
clone()The objects of this class are cloneable with this method.
GeneratedTransformation$clone(deep = FALSE)
deepWhether to make a deep clone.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other transformation classes:
FixedGroupsTransformation,
Transformation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.