Learn R Programming

ncar (version 0.3.4)

txtNCA: Text output of NCA

Description

This output NCA result in text form.

Usage

txtNCA(x, y, dose = 0, adm = "Extravascular", dur = 0, doseUnit = "mg", timeUnit = "h", 
       concUnit = "ug/L", iAUC = "", down="Linear", MW = 0, returnNA = FALSE)

Arguments

x

usually time

y

usually concentration

dose

given amount

adm

one of "Bolus" or "Infusion" or "Extravascular" to indicate drug administration mode

dur

duration of infusion

doseUnit

unit of dose

timeUnit

unit of time

concUnit

unit of concentration

iAUC

interval AUCs to calculate

down

either of "Linear" or "Log" to indicate the way to calculate AUC and AUMC

MW

molecular weight of the drug

returnNA

if returnNA is TRUE, it returns NA values also.

Value

Basically same with sNCA

See Also

help, sNCA, tabNCA, pdfNCA, rtfNCA

Examples

Run this code
# NOT RUN {
# For one subject
txtNCA(Theoph[Theoph$Subject=="1","Time"], Theoph[Theoph$Subject=="1","conc"], 
       dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h")

# or equivalently
x = Theoph[Theoph$Subject=="1","Time"]
y = Theoph[Theoph$Subject=="1","conc"]
txtNCA(x, y, dose=320, doseUnit="mg", concUnit="mg/L", timeUnit="h")

# For all subjects
IDs = sort(as.numeric(unique(Theoph[,"Subject"])))
nID = length(IDs)
Res = vector()
for (i in 1:nID) {
  tRes = txtNCA(Theoph[Theoph[,"Subject"]==IDs[i],"Time"], 
                Theoph[Theoph[,"Subject"]==IDs[i],"conc"], 
                dose=320, concUnit="mg/L", returnNA=FALSE)
  tRes = c(paste("ID =", IDs[i]), tRes, "")
  Res = c(Res, tRes)
}
Res
# }

Run the code above in your browser using DataLab