get_capl_bar_plot {capl} | R Documentation |
Render a bar plot for a given CAPL-2 domain score, grouped by CAPL-2 interpretative categories.
Description
This function renders a bar plot for a given CAPL-2 domain score, grouped by CAPL-2 interpretative categories.
Usage
get_capl_bar_plot(
score = NA,
interpretation = NA,
x_label = "Interpretation",
y_label = "Score",
colors = c("#333376", "#00a79d", "#f26522", "#a6ce39")
)
Arguments
score |
A numeric vector. |
interpretation |
A character vector representing CAPL-2 interpretative categories ("beginning", "progressing", "achieving", "excelling"). |
x_label |
An optional character vector representing the x-axis label. This argument is set to "Interpretation" by default. |
y_label |
An optional character vector representing the y-axis label. This argument is set to "Score" by default. |
colors |
An optional character vector representing the color palette for the bars. This argument is set to CAPL-2 branding colors by default (c("#333376", "#00a79d", "#f26522", "#a6ce39", "#747474")). |
Details
Other capl
functions called by this function include: validate_character()
, validate_number()
and capitalize_character()
.
Value
Renders a ggplot2 bar plot (if valid).
Examples
capl_results <- get_capl_demo_data(n = 25)
get_capl_bar_plot(
score = capl_results$capl_score,
interpretation = capl_results$capl_interpretation,
x_label = "Overall physical literacy interpretation",
y_label = "Overall physical literacy score",
)