tidy_pipe: Substitute the 'magrittr' pipe with R's native pipe operator

View source: R/tidy.R

tidy_pipeR Documentation

Substitute the magrittr pipe with R's native pipe operator

Description

Parse the R code in the RStudio editor, identify %>%, and substitute with |>.

Usage

tidy_pipe()

Note

Currently this function only works inside the RStudio IDE, and may be extended in future to deal with arbitrary R code elsewhere.

Examples


formatR::tidy_pipe()


yihui/formatR documentation built on Jan. 28, 2024, 1:07 p.m.