general_lineplot.Rd
This function generates a line plot for an ADNCA dataset based on user-selected analytes, subjects, and other parameters. The plot can be customized to display data on a linear or logarithmic scale and can be filtered by cycle.
general_lineplot(
data,
selected_analytes,
selected_usubjids,
colorby_var,
time_scale,
xaxis_scale,
cycle = NULL
)
A data frame containing the ADNCA dataset.
A character vector of selected analytes to be included in the plot.
A character vector of selected unique subject identifiers (USUBJIDs) to be included in the plot.
A character string specifying the variable by which to color the lines in the plot.
A character string specifying the time scale. Options are "By Cycle" or other values.
A character string specifying the x-axis scale. Options are "Log" or other values.
A character string or numeric value specifying the cycle to filter by
when time_scale
is "By Cycle". Default is NULL.
A ggplot object representing the line plot of pharmacokinetic concentration over time.
The function performs the following steps:a
Filters the data based on the selected analytes and subjects.
Selects relevant columns and removes rows with missing concentration values.
Converts 'USUBJID', 'DOSNO', and 'DOSEA' to factors.
Filters the data by cycle if time_scale
is "By Cycle".
Adjusts concentration values for logarithmic scale if xaxis_scale
is "Log".
Generates a line plot using the g_ipp
function with the specified parameters.
Adjusts the y-axis to logarithmic scale if xaxis_scale
is "Log".