Filter ggstatsplot subtitle to show selected statistics only

filter_ggstatsplot_subtitle(p, stats_idx = c(1, 3, 4, 7))

Arguments

p

ggstatsplot object

stats_idx

Indices of statistics to keep in subtitle

Value

ggstatsplot object with filtered subtitle

Examples

  p <- ggstatsplot::ggscatterstats(
    data = mtcars,
    x = disp,
    y = mpg
  )
  p_filtered <- filter_ggstatsplot_subtitle(p, stats_idx = c(1,3))
  print(p_filtered)
#> `stat_xsidebin()` using `bins = 30`. Pick better value `binwidth`.
#> `stat_ysidebin()` using `bins = 30`. Pick better value `binwidth`.