Description Usage Arguments Value Examples
For example, one can pass a training function, a prediction function, and additional arguments, and the constructed mungepiece will hold these arguments, ready to call the attached mungebit on a given dataframe.
1 | parse_mungepiece(args, train_only = FALSE)
|
args |
a list. This can be of the formats
|
train_only |
logical. Whether or not to leave the |
the parsed mungepiece
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
doubler <- column_transformation(function(x) x * 2)
mp <- parse_mungepiece(list(doubler, 'Sepal.Length'))
iris2 <- mungeplane(iris)
mp$run(iris2)
stopifnot(all.equal(iris2$data[[1]], 2 * iris[[1]]))
# TODO: Way more examples, unit tests
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.