split_pipeline: Split a pipeline expression into a list of expressions

Description Usage Arguments Details Value See Also Examples

View source: R/debug_pipeline.R

Description

split_pipeline takes an expression of a pipeline and splits it into a list of unevaluated calls.

Usage

1
split_pipeline(pipeline, ...)

Arguments

pipeline

A pipeline. Can be an unquoted or quoted expression, or a character vector of code. If missing, uses the text highlighted in RStudio's source editor.

...

Only used to allow assignment with = at the beginning of a pipeline.

Details

split_pipeline does not split nested pipelines.

Value

A list of unevaluated calls extracted from the pipeline.

See Also

The unexported magrittr:::split_chain, does not handle assignment, but collects the particular pipes used. burst_pipes invisibly returns a restructured split pipeline.

Examples

1
2
3
4
5
library(magrittr)

split_pipeline(
    quote(x <- 1:5 %>% rev %>% {. * 2} %>% sample(replace = TRUE))
)

alistaire47/pipecleaner documentation built on April 21, 2020, 1:29 a.m.