Learn R Programming

NonCompart (version 0.7.0)

gAUC: General Area Under the Curve

Description

General AUC function for Emax, TEmax and AUCs

Usage

gAUC(x, y, Ymax = "Emax", XofYmax = "TEmax", AUCname = "AUEClast", iAUC = "", 
     Outer = "NEAREST")

Value

Column names can vary according to the options.

Emax

maximum y value

TEmax

x value at the maximum y value

AUEClast

Area under the y versus x curve

iAUCs

Columns from iAUC input

Arguments

x

usually time

y

usually concentration or effect. This can be negative/

Ymax

usually Cmax or Emax

XofYmax

usually Tmax or TEmax

AUCname

usually AUClast or AUEClast

iAUC

a data.frame to calculate interval AUCs

Outer

indicates how to do the out of x range point

Author

Kyun-Seop Bae <k@acr.kr>

Details

This is a general purpose AUC function. It calculates only Cmax(Emax), Tmax(TEmax) and AUCs(AUECs). This can be used for effect(pharmacodynamic) data which has negative values. For concentration data, use IntAUC.

Examples

Run this code
# For one subject
x = Theoph[Theoph$Subject=="1", "Time"]
y = Theoph[Theoph$Subject=="1", "conc"]
gAUC(x, y)

iAUC = data.frame(Name=c("AUC[0-12h]","AUC[0-24h]"), Start=c(0,0), End=c(12,24))
gAUC(x, y, iAUC=iAUC)

Run the code above in your browser using DataLab