Remedies a common problem in piping: not having access to intermediate outputs of the pipe. Within a "loop", a piping intermediate is stored in a stack archive, data is processed, and then both the stored intermediate and the current output are reintegrated using an "ending" function. Two special ending functions are provided: amend and insert. However, any ending function can be specified, including merge functions, join functions, setNames(), etc. This framework allows the following work-flow: focus on a particular aspect or section of a data set, conduct specific operations, and then reintegrate changes into the whole.
This package contains a flexible framework for extending the pipe into a loop. This allows a basic strategy of focusing on a certain aspect of the data frame, make some changes, and then reincorporate these changes into the original data frame.
Install with
install.packages("loopr") for stable version
devtools::install_github("bramtayl/loopr") for bleeding edge version
See vignette for package details.