A helper function that validates, processes, and combines concentration and dose data. It creates the unified legend and faceting variables and calculates the factor levels for the plot scales.
prepare_plot_data(
data_conc,
data_dose,
shape_var,
colour_var,
grouping_vars,
labels_df,
tooltip_vars,
plot_conc_data,
plot_dose_data
)A list containing data (the processed tibble), shape_levels,
and colour_levels.
A data.frame of concentration data.
An optional data.frame of dosing data.
Character. The column name from data_conc for the legend.
Character. The column name from data_dose for the legend.
Character vector. Column names for faceting.
A data.frame for label lookups.
Character vector of variables for the tooltip.
Logical flag derived from show_pk_samples and data_conc.
Logical flag derived from show_doses and data_dose.