Learn R Programming

microsamplingDesign (version 1.0.8)

plotObject: generic function to plot an object

Description

generic function to plot an object

Usage

plotObject(object, ...)

# S4 method for PkModel plotObject(object, times, nCurves = 12, nSamplesIntegration = 1000, seed = 134, sampleCurvesOnly = FALSE, indSamplingPoints = FALSE)

# S4 method for PkData plotObject(object, nCurves = NULL, nSamplesIntegration = 1000, sampleCurvesOnly = TRUE, seed = NULL, indSamplingPoints = TRUE, addZeroIsZero = FALSE)

Arguments

object

a S4 class object

...

additional parameters

times

numeric vector at of times at which the model should be simulated for PkModel-class

nCurves

the number of sample curves defaults to 12 for PkModel-class , if PkData-class defaults to NULL meaning all data are plotted

nSamplesIntegration

number of simulated curves to calculate averaged curve, defaults to 1000

seed

specify the random seed to draw samples to get the same plot each time

sampleCurvesOnly

logical value if TRUE only sample curves are displayed and the averaged curve omitted , defaults to FALSE for PkModel-class and TRUE for PkData-class

indSamplingPoints

logical indicator if TRUE sample times are indicated on the plot, defaults to FALSE for PkModel-class and TRUE for PkData-class

addZeroIsZero

logical value, when TRUE the zero point is added to the plot with value zero ( only for PkData-class , defaults to FALSE )

Examples

Run this code
# NOT RUN {
# examples with limited number of samples, increase samples in practice
plotObject( object =  getExamplePkModel() , 
   times = seq( 0 , 10 , 1 )  , nSamplesIntegration = 25 )
plotObject( object =  getExamplePkModel() ,
   times = seq( 0 , 10 , 1 ) , nCurves = 3 , nSamplesIntegration = 5  )
plotObject( object =  getExamplePkModel() ,
    times = seq( 0 , 10 , 1 ) , nCurves = 3 , sampleCurvesOnly = TRUE  )
# }
# NOT RUN {
pkData    <-   getPkData( getExamplePkModel() , 1:10 ,  5 , 10 )
plotObject( object =  pkData  )
plotObject( object =  pkData , nCurves = 2 )
plotObject( object =  pkData , nCurves = 2 , addZeroIsZero = TRUE )
plotObject( object = pkData , nCurves = 3 , 
   sampleCurvesOnly = FALSE , nSamplesIntegration = 25   ) 
# }

Run the code above in your browser using DataLab