Skip to content

Instantly share code, notes, and snippets.

@jthomasmock
Created May 30, 2022 16:50
Show Gist options
  • Save jthomasmock/336b9f605050c331da37d7ecec450902 to your computer and use it in GitHub Desktop.
Save jthomasmock/336b9f605050c331da37d7ecec450902 to your computer and use it in GitHub Desktop.
``` r
library(gtExtras)
all_fns <- lsf.str("package:gtExtras") |>
tibble::tibble(fn_name = _) |>
dplyr::mutate(fn_id = dplyr::row_number()) |>
dplyr::rowwise() |>
dplyr::mutate(args = list(formalArgs(fn_name))) |>
tidyr::unnest_longer(args) |>
dplyr::ungroup()
gt_fns <- all_fns |>
dplyr::filter(grepl(x = fn_name, pattern = "gt"))
gt_fns |>
dplyr::count(fn_name, sort = TRUE)
#> # A tibble: 40 × 2
#> fn_name n
#> <ls_str> <int>
#> 1 gt_plt_conf_int 9
#> 2 gt_plt_dist 9
#> 3 gt_two_column_layout 9
#> 4 gt_highlight_rows 8
#> 5 gt_plt_bar 8
#> 6 gt_add_divider 7
#> 7 gt_color_rows 7
#> 8 gt_fa_repeats 7
#> 9 gt_plt_bar_stack 7
#> 10 gt_plt_sparkline 7
#> # … with 30 more rows
```
<sup>Created on 2022-05-30 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)</sup>
# Gist URL https://gist.github.com/336b9f605050c331da37d7ecec450902
# Code image at: ![](https://i.imgur.com/fOjF9ad.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment