Description Usage Arguments Details Examples
Evaluate an expression pipeline enclosed by {}
or a sequence of expressions
as as pipeline. This functions works to chain expressions without using %>>%
operator but produce the same result.
1 |
... |
Pipeline expressions. Supply multiple pipeline expressions as arguments or
only an enclosed expression within |
When pipeline(...)
is called with multiple arguments, the arguments will be
regarded as pipeline expressions.
When pipeline(...)
is called with a single argument, the argument is expected to
be a block expression enclosed by {}
in which each expression will be regarded
as a pipeline expression.
The pipeline expressions will be chained sequentially by %>>%
and be evaluated
to produce the same results as if using the pipe operator.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | pipeline(1:10, sin, sum)
pipeline(1:10, plot(col = "red", type = "l"))
pipeline(mtcars,
lm(formula = mpg ~ cyl + wt),
summary,
coef)
pipeline({
mtcars
lm(formula = mpg ~ cyl + wt)
summary
coef
})
pipeline({
mtcars
"Sample data" ? head(., 3)
lm(formula = mpg ~ cyl + wt)
~ lmodel
summary
? .$r.squared
coef
})
pipeline({
mtcars
"estimating a linear model ..."
lm(formula = mpg ~ cyl + wt)
"summarizing the model ..."
summary
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.