Skip to contents

This function takes an R script and outputs a tibble with pipe counts by type always outputs a count for both

Usage

pipe_counter(filename)

Arguments

filename

a character string which is a file name

Value

a tibble with counts of each pipe type, |> and %>%

Examples

example_script("generic_tidyverse_script") |>
  pipe_counter()
#> # A tibble: 2 × 2
#>   pipe      n
#>   <chr> <int>
#> 1 %>%       2
#> 2 |>        2