Introduction

This is mostly to keep track of how the performance of different functions changes across time.

ggbetweenstats

bench::mark(
  ggbetweenstats(
    data = dplyr::filter(
      movies_long,
      genre %in% c("Action", "Action Comedy", "Action Drama", "Comedy")
    ),
    x = mpaa,
    y = length
  )
) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    700ms    700ms      1.43     327MB     5.71

bench::mark(
  grouped_ggbetweenstats(
    data = dplyr::filter(
      movies_long,
      genre %in% c("Action", "Action Comedy", "Action Drama", "Comedy")
    ),
    x = mpaa,
    y = length,
    grouping.var = genre
  )
) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    1.31s    1.31s     0.765     226MB     6.12

ggwithinstats

bench::mark(
  ggwithinstats(
    data = bugs_long,
    x = condition,
    y = desire
  )
) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1     4.5s     4.5s     0.222     600MB     2.00


bench::mark(
  grouped_ggwithinstats(
    data = bugs_long,
    x = condition,
    y = desire,
    grouping.var = gender
  )
) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    3.22s    3.22s     0.310     577MB     2.48

gghistostats

bench::mark(gghistostats(mtcars, wt, test.value = 3)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1   82.1ms   83.9ms      11.4    3.59MB     5.72


bench::mark(grouped_gghistostats(mtcars, wt, test.value = 3, grouping.var = am)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    180ms    180ms      5.56    5.13MB     11.1

ggdotplotstats

bench::mark(ggdotplotstats(
  dplyr::filter(ggplot2::mpg, cyl %in% c("4", "6")),
  cty,
  manufacturer,
  test.value = 15
)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1   87.8ms   91.4ms      11.0    2.88MB     2.21


bench::mark(
  grouped_ggdotplotstats(
    dplyr::filter(ggplot2::mpg, cyl %in% c("4", "6")),
    cty,
    manufacturer,
    test.value = 15,
    grouping.var = cyl
  )
) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    179ms    181ms      5.52    5.19MB     2.76

ggscatterstats

bench::mark(ggscatterstats(mtcars, wt, mpg)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1   64.3ms   64.7ms      14.8    6.33MB     4.94


bench::mark(grouped_ggscatterstats(mtcars, wt, mpg, grouping.var = am)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    133ms    134ms      7.48    5.53MB     7.48

ggcorrmat

bench::mark(ggcorrmat(iris)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1     12ms   12.4ms      80.2    1.52MB     6.68


bench::mark(grouped_ggcorrmat(iris, grouping.var = Species)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1   39.2ms   40.1ms      24.8     609KB     6.20

ggpiestats



bench::mark(ggpiestats(mtcars, cyl)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    818ms    818ms      1.22    13.4MB     4.89


bench::mark(grouped_ggpiestats(mtcars, cyl, grouping.var = am)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    1.73s    1.73s     0.579    20.6MB     4.64

ggbarstats

bench::mark(ggbarstats(ggplot2::mpg, fl, class)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    2.33s    2.33s     0.428     138MB     4.71


bench::mark(grouped_ggbarstats(ggplot2::mpg, fl, class, grouping.var = drv)) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1    5.89s    5.89s     0.170     183MB     4.42

ggcoefstats

bench::mark(ggcoefstats(stats::lm(formula = wt ~ am * cyl, data = mtcars))) %>%
  dplyr::select(-expression)
#> # A tibble: 1 × 5
#>        min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1   34.4ms   35.3ms      27.9    5.01MB     4.65

Suggestions

If you find any bugs or have any suggestions/remarks, please file an issue on GitHub: https://github.com/IndrajeetPatil/ggstatsplot/issues