-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
53 lines (40 loc) · 1.05 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
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:
``` r
# install.packages("devtools")
devtools::install_github("mikmart/flow")
```
## Example
You can `flow::track` the number of rows dropped with `dplyr::filter`:
```{r example-1, message = FALSE}
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 ...
```{r example-2}
filtered
```
... but the `filter` "history" can be extracted.
```{r example-3}
filtered %>%
flow::chart()
```