createArgFunction {ParallelLogger} | R Documentation |
Create an argument function
Description
Create an argument function
Usage
createArgFunction(
functionName,
excludeArgs = c(),
includeArgs = NULL,
addArgs = list(),
rCode = c(),
newName
)
Arguments
functionName |
The name of the function for which we want to create an args function. |
excludeArgs |
Exclude these arguments from appearing in the args function. |
includeArgs |
Include these arguments in the args function. |
addArgs |
Add these arguments to the args functions. Defined as a list with format name = default. |
rCode |
A character vector representing the R code where the new function should be appended to. |
newName |
The name of the new function. If not specified, the new name will be automatically derived from the old name. |
Details
This function can be used to create a function that has (almost) the same interface as the specified function, and the output of this function will be a list of argument values.
Value
A character vector with the R code including the new function.
Examples
createArgFunction("read.csv", addArgs = list(exposureId = "exposureId"))
[Package ParallelLogger version 3.3.0 Index]