# 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