knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

flow

The goal of flow is to make it easy to extract numbers for population defining flowcharts with minimal edits to existing dplyr workflows.

Note that this is an extremely early stage (practically idea concept) package.

Installation

You can install the development version with:

# install.packages("devtools")
devtools::install_github("mikmart/flow")

Example

You can flow::track the number of rows dropped with dplyr::filter:

library(dplyr)

filtered <- mtcars %>%
  flow::track("1974 Motor Trend cars") %>%
  filter(mpg >= 20, mpg <= 30) %>%
  filter(cyl < 6)

The result looks like a regular tbl_df ...

filtered

... but the filter "history" can be extracted.

filtered %>% 
  flow::chart()


mikmart/flow documentation built on Feb. 2, 2024, 2 a.m.