``` {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")

Overview

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:

The View Pipe Chain Steps RStudio addin

Thanks to @batpigandme for the the gif!

Alternatively, you can:

diamonds %>%
  select(carat, cut, color, clarity, price) %>%
  group_by(color) %>%
  summarise(n = n(), price = mean(price)) %>%
  arrange(desc(color)) %>%
  print_pipe_steps() -> result
diamonds %>%
  select(carat, cut, color, clarity, price) %>%
  group_by(color) %>%
  summarise(n = n(), price = mean(price)) %P>%
  arrange(desc(color)) -> result

Installation

devtools::install_github("daranzolin/ViewPipeSteps")

More Examples

Check tools/test_cases.R for more elaborate examples.

Future Work



daranzolin/ViewPipeSteps documentation built on Dec. 26, 2021, 6:12 p.m.