``` {r, include = FALSE} library(tidyverse) library(ViewPipeSteps)
# ViewPipeSteps <img src='man/figures/logo.png' align="right" height="139" /> ![CRAN log](http://www.r-pkg.org/badges/version/ViewPipeSteps) ![](http://cranlogs.r-pkg.org/badges/grand-total/ViewPipeSteps) # Installation You can install the released version of ViewPipeSteps from CRAN with: ```r install.packages("ViewPipeSteps")
Or install the development version from GitHub with:
remotes::install_github("daranzolin/ViewPipeSteps")
ViewPipeSteps helps to debug pipe chains in a slightly more elegant fashion. Print/View debugging isn't sexy, but instead of manually inserting %>% View()
after each step, spice it up a bit by, e.g., highlighting the entire chain and calling the viewPipeChain
addin:
Thanks to @batpigandme for the the gif!
Alternatively, you can:
printPipeChain
addin. diamonds %>% select(carat, cut, color, clarity, price) %>% group_by(color) %>% summarise(n = n(), price = mean(price)) %>% arrange(desc(color)) %>% print_pipe_steps() -> result
%P>%
pipe variant that prints the output
of the pipe's left hand side prior to piping it to the right hand side.diamonds %>% select(carat, cut, color, clarity, price) %>% group_by(color) %>% summarise(n = n(), price = mean(price)) %P>% arrange(desc(color)) -> result
devtools::install_github("daranzolin/ViewPipeSteps")
Check tools/test_cases.R for more elaborate examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.