Misc: Utilities

UtilitiesR Documentation

Utilities

Description

Miscellaneous functions, used mainly internally in the package, but of possible use externally.

Usage

buildQEcall(qeFtnName,dataName,yName=NULL,opts=NULL,holdout=NULL,
    holdoutArg=TRUE) 
evalr(toexec) 
newDFRow(dta,yName,x,dtaRowNum=1)

Arguments

qeFtnName

Quoted name of a qeML predictive function.

dataName

Quoted name of a data frame.

yName

Quoted name of a column to be predicted.

opts

Non-default arguments for the function specified in qeFtnName.

holdout

Size of holdout set, if any.

holdoutArg

A value TRUE means the function specified in qeFtnName has an argument 'holdout'.

toexec

Quoted string containing an R function call.

dta

A data frame.

x

An R list specifying fields to be set.

dtaRowNum

Row number in 'dta' to be used as a basis.

Details

The function qeFtnName does what its name implies: It assembles a string consisting of a qeML function call. Typically the latter is then executed via evalr. See for instance the source code of qeLeaveOut1Var.

R's generic predict function generally required that the input rows match the original training data in name and class. The newDFRow function can be used to construct such a row.

Author(s)

Norm Matloff

Examples


# function to list all the objects loaded by the specified package
lsp <- function(pkg) {
   cmd <- paste('ls(package:',pkg,')')
   evalr(cmd)
}
lsp('regtools')
# outputs 
#  [1] "clusterApply"        "clusterApplyLB"      "clusterCall"        
#  [4] "clusterEvalQ"        "clusterExport"       "clusterMap"         
# ...

matloff/qeML documentation built on Dec. 15, 2024, 10:15 a.m.