| getParam {rmake} | R Documentation |
Wrapper around the params global variable
Description
Returns an element of the global params variable that is normally used to send parameters
to a script from the Makefile generated by rmake. Script parameters may be defined with
the params argument of the rRule() or markdownRule() functions.
Usage
getParam(name, default = NA)
Arguments
name |
Name of the parameter |
default |
Default value to be returned if the |
Value
Function returns an element of given name from the params variable that is created
inside of the Makefile recipe. If the params global variable does not exist (the script
is likely to be executed directly, i.e., not from the Makefile generated by rmake),
the default value is returned and a warning is generated. If the params global variable
exists but it is not a list or the name element does not exist there, an error is thrown.
Author(s)
Michal Burda
See Also
Examples
task <- getParam('task', 'default')