View source: R/universal_useful.R
expr_pipe | R Documentation |
Useful when making complex compound statements that require dynamic substitution via tidy eval for dynamically created variables derived from the context.
expr_pipe(exprs)
exprs |
|
expression
(.data <- tibble::tibble(val = runif(10)))
(exp <- expr_pipe(
rlang::exprs(
.data,
dplyr::mutate(val = val + 5, category = sample(1:3, length(val), replace = TRUE)),
dplyr::group_by(category),
dplyr::summarise(s = sum(val))
)
))
rlang::eval_bare(exp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.