Plot method for object of class "hstats".

# S3 method for class 'hstats'
plot(
  x,
  which = 1:3,
  normalize = TRUE,
  squared = TRUE,
  sort = TRUE,
  top_m = 15L,
  zero = TRUE,
  fill = getOption("hstats.fill"),
  viridis_args = getOption("hstats.viridis_args"),
  facet_scales = "free",
  ncol = 2L,
  rotate_x = FALSE,
  ...
)

Arguments

x

Object of class "hstats".

which

Which statistic(s) to be shown? Default is 1:3, i.e., show \(H^2_j\) (1), \(H^2_{jk}\) (2), and \(H^2_{jkl}\) (3).

normalize

Should statistics be normalized? Default is TRUE.

squared

Should squared statistics be returned? Default is TRUE.

sort

Should results be sorted? Default is TRUE. (Multi-output is sorted by row means.)

top_m

How many rows should be plotted? Inf for all.

zero

Should rows with all 0 be shown? Default is TRUE.

fill

Fill color of ungrouped bars. The default equals the global option hstats.fill = "#fca50a". To change the global option, use options(stats.fill = new value).

viridis_args

List of viridis color scale arguments, see [ggplot2::scale_color_viridis_d()]. The default points to the global option hstats.viridis_args, which corresponds to list(begin = 0.2, end = 0.8, option = "B"). E.g., to switch to a standard viridis scale, you can change the default via options(hstats.viridis_args = list()), or set viridis_args = list().

facet_scales

Value passed as scales argument to [ggplot2::facet_wrap()].

ncol

Passed to [ggplot2::facet_wrap()].

rotate_x

Should x axis labels be rotated by 45 degrees?

...

Passed to ggplot2::geom_bar().

Value

An object of class "ggplot".

See also

See hstats() for examples.