lifecycle::badge("experimental")
Container for the type of transformation used in
Pipeline
.
Note: For internal use.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
name
Name of transformation.
fn
Transformation function.
args
list
of arguments for `fn`
.
group_cols
Names of columns to group data.frame
by before applying `fn`
.
When `NULL`
, the data.frame
is not grouped.
new()
Initialize transformation.
Transformation$new(fn, args, name = NULL, group_cols = NULL)
fn
Transformation function.
args
list
of arguments for `fn`
.
name
Name of transformation.
group_cols
Names of columns to group data.frame
by before applying `fn`
.
When `NULL`
, the data.frame
is not grouped.
data
data.frame
.
A grouped data.frame
will first be ungrouped. If `group_cols`
is specified,
it will then be grouped by those columns.
Transformed version of `data`
.
print()
Print an overview of the transformation.
Transformation$print(..., indent = 0, show_class = TRUE)
...
further arguments passed to or from other methods.
indent
How many spaces to indent when printing.
show_class
Whether to print the transformation class name.
The pipeline. To allow chaining of methods.
clone()
The objects of this class are cloneable with this method.
Transformation$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other transformation classes:
FixedGroupsTransformation
,
GeneratedTransformation