This function generates a mean concentration plot for an ADNCA dataset based on user-selected study IDs, analytes, and cycles. The plot can be customized to display data on a linear or logarithmic scale and can optionally include standard deviation error bars.
general_meanplot(
data,
selected_studyids,
selected_analytes,
selected_pcspecs,
selected_cycles,
id_variable = "DOSEA",
groupby_var = c("STUDYID", "PARAM", "PCSPEC", "ATPTREF"),
plot_ylog = FALSE,
plot_sd_min = FALSE,
plot_sd_max = FALSE,
plot_ci = FALSE
)A ggplot object representing the mean concentration plot.
A data frame containing the ADNCA dataset.
A character vector of selected study IDs to be included in the plot.
A character vector of selected analytes to be included in the plot.
A character vector of selected matrices to be included in the plot.
A character vector or numeric vector of selected cycles to be included in the plot.
A character string specifying the variable by which to color the lines in the plot. Default is "DOSEA".
A character string specifying the variable by which to group the data.
A logical value indicating whether to use a logarithmic scale for the y-axis. Default is FALSE.
A logical value to add a SD error bar below the mean. Default is FALSE.
A logical value to add a SD error bar above the mean. Default is FALSE.
A logical value indicating whether to include confidence interval 95% ribbon. Default is FALSE.