Producing DDI Ratio plots
Usage
plotDDIRatio(
data,
metaData = NULL,
dataMapping = NULL,
plotConfiguration = NULL,
residualsVsObserved = NULL,
foldDistance = NULL,
deltaGuest = NULL,
plotObject = NULL
)Arguments
- data
A data.frame to use for plot.
- metaData
A named list of information about
datasuch as thedimensionandunitof its variables.- dataMapping
A
DDIRatioDataMappingobject mappingx,yand aesthetic groups to their variable names ofdata.- plotConfiguration
An optional
DDIRatioPlotConfigurationobject defining labels, grid, background and watermark.- residualsVsObserved
Optional logical value defining if DDI Ratio plot is drawn as residuals vs observed, instead of predicted vs observed.
- foldDistance
Numeric values of fold distance lines to display in log plots. This argument is internally translated into
linesfield ofdataMapping. Caution: this argument is meant for log scaled plots and since fold distance is a ratio it is expected positive. In particular, line of identity corresponds to afoldDistanceof1.- deltaGuest
Numeric value parameter of Guest function
- plotObject
An optional
ggplotobject on which to add the plot layer
References
For examples, see: https://www.open-systems-pharmacology.org/TLF-Library/articles/pk-ratio-vignette.html
See also
Other molecule plots:
plotBoxWhisker(),
plotCumulativeTimeProfile(),
plotGrid(),
plotHistogram(),
plotObsVsPred(),
plotObservedTimeProfile(),
plotPKRatio(),
plotPieChart(),
plotQQ(),
plotResVsPred(),
plotResVsTime(),
plotSimulatedTimeProfile(),
plotTimeProfile(),
plotTornado()
Examples
# Produce DDI Ratio plot
ddiData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4))
plotDDIRatio(data = ddiData, dataMapping = DDIRatioDataMapping$new(x = "x", y = "y"))
# Produce DDI Ratio plot with user-defined horizontal lines
plotDDIRatio(
data = ddiData,
dataMapping = DDIRatioDataMapping$new(x = "x", y = "y"),
foldDistance = c(1, 10),
deltaGuest = 1.25,
residualsVsObserved = TRUE
)