A pipeline, or a "functional sequence", need not be applied
to a left-hand side value instantly. Instead it can serve as
a function definition. A pipeline where the left-most left-hand
side is the magrittr placeholder (the dot .
) will thus create a
function, which applies each right-hand side in sequence to its
argument, e.g. f <- . %>% abs %>% mean(na.rm = TRUE)
.
Three new operators are introduced for some special cases
%<>%
%T>%
%$%
For more information see the documentation, e.g. ?%T>%
.
Lambdas can now be made by enclosing several statements in curly braces, and is a unary function of the dot argument.
For more information and examples, see the updated vignette, and help files.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.