An R package providing multiple pipeline styles (operator, object, function) for readable function chaining and data transformation.
pipeR is an R package that provides multiple styles of function chaining methods, including a pipe operator, pipe object, and pipeline function. It solves the problem of deeply nested and hard-to-read R code by offering flexible, readable syntax for creating data transformation pipelines. The package allows values to be piped as arguments, via dot notation, or using lambda expressions, making complex operations more maintainable.
R developers and data scientists who frequently build data transformation pipelines and seek cleaner, more readable alternatives to nested function calls. It's particularly useful for those working with packages like dplyr, ggvis, or rlist.
Developers choose pipeR for its multi-paradigm flexibility, allowing them to select the pipeline style that best fits their coding preferences. Its support for side-effects, assignments, and element extraction within pipelines, along with strong compatibility with popular R packages, makes it a versatile tool for improving code clarity and workflow efficiency.
Multi-Paradigm Pipeline Implementation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers operator-based (`%>>%`), object-based (`Pipe()`), and function-based (`pipeline()`) chaining, allowing developers to select the syntax that best fits their workflow, as shown in the README's bootstrap example rewritten in four different ways.
Supports piping values as the first unnamed argument, via dot symbol (`.`), or using formula-based lambda expressions, making it adaptable to functions with non-standard signatures, such as `lm(mpg ~ ., data = .)`.
Enables printing, plotting, or saving intermediate results without breaking the pipeline flow using `~` syntax or `(? )` for quick inspection, as demonstrated with `cat()` and `plot()` in examples.
Allows saving intermediate values to variables directly within the chain via `(~ symbol)` or `(symbol = expression)` syntax, facilitating debugging and value reuse without exiting the pipeline.
The multiple paradigms and special syntaxes (e.g., `~` for side-effects, `(? )` for printing, lambda expressions) can overwhelm users and lead to fragmented coding styles within teams, especially compared to simpler alternatives like magrittr.
Relies on custom operators like `%>>%` that are not part of base R or as widely adopted as magrittr's `%>%`, potentially causing integration issues in projects mixing tidyverse and pipeR code.
Features such as lambda expressions and assignment within pipelines require additional learning, and the tutorial assumes prior R knowledge, which might deter users seeking plug-and-play solutions.