knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
You can install the development version with:
# install.packages("devtools") devtools::install_github("mikmart/flow")
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.