| plotPK | R Documentation |
Generates individual and superposed concentration vs. time curves and saves them in pdf and tiff files.
plotPK(concData, id, Time, conc, unitTime = "hr", unitConc = "ng/mL", trt = "",
fit = "Linear", dose = 0, adm = "Extravascular", dur = 0, outdir = "Output",
name = "")
concData |
name of data table containing time-concentration data of multiple subjects |
id |
column name for subject ID |
Time |
column name for the time |
conc |
column name for the concentration |
unitTime |
unit for the time |
unitConc |
unit for the concentration |
trt |
column name for the treatment code. This is useful for crossover study like bioequivalence trial. |
fit |
one of |
dose |
administered dose. One should be careful for the unit. This can be a vector containing dose for each subject and treatment in order. |
adm |
one of |
dur |
infusion duration for constant infusion, otherwise 0. This can be a vector containing values for each subject and treatment in order. |
outdir |
name of the folder to be used for the output files. |
name |
stem used in the output file names. |
This function generates five figures: individual linear and semi-logarithmic profiles (one pdf each, several panels per page) and pooled linear, semi-logarithmic and mean with 95% confidence interval profiles (one tiff each, or png where the R build has no tiff device).
Each subject gets its own colour and plotting symbol whatever the number of subjects, and the subject legend is drawn in a panel of its own so that it cannot overlap the curves. When there are more subjects than can be labelled legibly, the count is shown instead of an unreadable legend. Treatment panels are laid out in a grid of at most four columns, so a study with many treatments neither exhausts the figure margins nor produces an enormous raster.
Non-finite times and concentrations are dropped from the axis ranges, and the semi-logarithmic figures use only positive concentrations. The semi-logarithmic axis is aligned to whole decades enclosing the data, so a labelled tick is always visible.
This function calls NCA().
Invisibly, a character vector of the paths written. The files are saved in the
outdir folder.
Jee Eun Lee <JeeEun.Lee@fda.hhs.gov>, Kyun-Seop Bae <k@acr.kr>
NCA
# plotPK(Theoph, "Subject", "Time", "conc", unitTime="hr", unitConc="mg/L", dose=320)
# plotPK(Indometh, "Subject", "time", "conc", unitTime="hr", unitConc="mg/L", adm="Bolus", dose=25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.