Skip to contents

Wraps stat_bracket_y_max() with the geometry inputs every module's Stats tab carries, so the three modules that draw significance brackets share one call rather than three copies of the same argument list. Missing inputs fall back to the tab's own defaults, which matters while the tab has yet to be rendered.

Usage

stat_bracket_headroom(
  df,
  x,
  y,
  group.by = NULL,
  facet.by = NULL,
  per.facet = TRUE,
  input,
  dodge.width = 1
)

Arguments

df, x, y, group.by, facet.by, per.facet, dodge.width

Passed to stat_bracket_y_max().

input

The Shiny input object from inside moduleServer().

Value

A single number, or NULL when no brackets would be drawn.

Author

Jared Andrews

Examples

if (FALSE) { # \dontrun{
# As the `headroom` of setup_axis_range(), inside a module server:
headroom <- function() {
    if (!isTRUE(input$stats.enabled)) return(NULL)
    stat_bracket_headroom(data(), x = input$x.data, y = input$y.data, input = input)
}
} # }