Parse the R code in the RStudio editor, identify %>%, and substitute
with |>.
tidy_pipe()Currently this function only works inside the RStudio IDE, and may be extended in future to deal with arbitrary R code elsewhere.
if (FALSE) { # interactive()
formatR::tidy_pipe()
}