More intuitive interface to PlotPopulationCurve()

PlotResultsPopulationCurve(results, trial = 1, year = 2020, sex = "f", ...)

Arguments

results

Results list (as returned by RunExperiments())

trial

Trial number (index into the results list)

year

Year in trial timeseries to plot

sex

Sex to plot (from c("m", "M", "f", "F"), defaults to female)

...

Parameters passed to PlotPopulationCurve()

Value

ggplot grob, or NULL on error

Examples

if (FALSE) {
# These two function calls produce the same output:
pacehrh::PlotResultsPopulationCurve(results,
  trial = 26, year = 2025, sex = "m")
pacehrh::PlotPopulationCurve(results[[26]]$Population[["2025"]]$Male)
}