plot_cosmo_data: Plot COSMO data

Description Usage Arguments Value

View source: R/02_model_output_calc_plot_functions.R

Description

plot_cosmo_data a generic function called by various wrapper functions to plot a data frame returned by one of our calc methods by age group and/or in total over time.

Usage

1
2
3
4
5
6
7
8
plot_cosmo_data(
  df_plotting,
  proportion = FALSE,
  age_proportion = FALSE,
  only_all = TRUE,
  print_plot = TRUE,
  label_y
)

Arguments

df_plotting

Data.frame of data to be plotted.

proportion

Flag (default is FALSE) of whether to divide the outcome of interest by total population.

age_proportion

Flag (default is FALSE) of whether to divide the outcome of interest by age-specific total population.

only_all

Flag (default is TRUE) of whether only overall ("All") data should be plotted.

print_plot

Flag (default is TRUE) of whether the plot should be printed in screen.

label_y

y-axis label.

Value

A ggplot object.


SC-COSMO/sccosmomcma documentation built on Dec. 18, 2021, 11:56 a.m.