Skip to contents

Generates figures for each cohort/output for a given set of parameter estimates.

Usage

system_plot_cohorts(
  erp,
  plot_opts = c(),
  cfg,
  analysis_name = "analysis",
  archive_results = TRUE,
  prefix = NULL
)

Arguments

erp

output from system_simulate_estimation_results

plot_opts

list controling how predictions and data are overlaid

cfg

ubiquity system object

analysis_name

string containing the name of the analysis

archive_results

boolean variable to control whether results will be archived

prefix

depreciated input mapped to analysis_name

Value

List of plot outputs containing two elements timecourse and obs_pred, for the time course of and observed vs predicted, respectively. Both of these fields contain three elements for a given output. For example, say there is an output named PK the both the timecourse and obs_pred elements will have a field named PK containing a ggplot object and two fields PK_png and PK_pdf containing the paths to the files containing that figure in the respective formats.

Details

The general format for a plot option for a given output (OUTPUT) is:

plot_opts$outputs$OUTPUTt$option = value

The following options are:

  • yscale and xscale = "linear" or "log"

  • ylabel and xlabel = "text"

  • xlim and ylim = c(min, max)

It is also possible to control the height and width of the time course tc and observed vs predicted op file by specifying the following in the default units of ggsave.

  • plot_opts$tc$width = 10

  • plot_opts$tc$height = 5.5

  • plot_opts$op$width = 10

  • plot_opts$op$height = 8.0

To control the figures that are generated you can set the purpose to either "print", "present" (default) or "shiny".

plot_opts$purpose = "present"

See also