Description Usage Arguments Details Value Author(s) Examples
Parses NONMEM statements and attempts to apply them to a data frame in order to create a response variable
1 2 3 4 5 6 7 8 | applyPredCode(df,
pred,
respCol = getEctdColName("Response"),
report = TRUE,
keepCols = respCol,
verbose = getEctdVerbose())
parsePredCode(model, respCol = getEctdColName("Response"))
|
df |
(Required) Data frame to which parsed NONMEM statements are to be applied |
pred |
Character vector of NONMEM statements |
respCol |
Response column name ( iven by getEctdColName by default) |
report |
Logical: should a textual report be produced? |
keepCols |
Character vector of column names to retain in the return dataset |
verbose |
Logical: Should verbose logging be used? ( given by getEctdVerbose by default) |
model |
File containing analysis code (for R or SAS) or an R function for analysis (R only) |
The applyPredCode
function calls the parsePredCode
function in order to convert
the NONMEM statements to executable R statements.
The applyPredCode
function then iteratively "tries" to apply these statements to the
data ("df"), producing a textual report of the process if "report" is set to TRUE.
The "keepCols" columns from the updated dataset are then returned
A dataset with new columns added
Mike K Smith mstoolkit@googlemail.com
1 2 3 4 5 | parsePredCode(c(
"X = 1",
"IF (X.EQ.1.OR.Y.GT.0) STUD = 1",
"NEWVAR = THETA(1) + EXP(ETA(2))**LOG(EPS(1))"
))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.