| barPlot | R Documentation | 
<summarised_result> objectCreate a bar plot visualisation from a <summarised_result> object
barPlot(
  result,
  x,
  y,
  width = NULL,
  just = 0.5,
  facet = NULL,
  colour = NULL,
  style = "default",
  label = character()
)
| result | A  | 
| x | Column or estimate name that is used as x variable. | 
| y | Column or estimate name that is used as y variable. | 
| width | Bar width, as in  | 
| just | Adjustment for column placement, as in  | 
| facet | Variables to facet by, a formula can be provided to specify which variables should be used as rows and which ones as columns. | 
| colour | Columns to use to determine the colours. | 
| style | Which style to apply to the plot, options are: "default", "darwin" and NULL (default ggplot style). Customised styles can be achieved by modifying the returned ggplot object. | 
| label | Character vector with the columns to display interactively in
 | 
A plot object.
result <- mockSummarisedResult() |> dplyr::filter(variable_name == "age")
barPlot(
  result = result,
  x = "cohort_name",
  y = "mean",
  facet = c("age_group", "sex"),
  colour = "sex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.