Learn R Programming

TDMR (version 2.2)

setParams: Merge the parameters from a partial list and the default list

Description

Merge the parameters from a partial list and the default list

Usage

setParams(opts, defaultOpt, keepNotMatching = FALSE)

Arguments

opts

a partial list of parameters

defaultOpt

a list with default values for every element

keepNotMatching

[FALSE] if TRUE, copy the elements appearing in opts, but not in defaultOpt to the return value. If FALSE, do not copy them, but issue a warning.

Value

a list combined from opts and defaultOpt where every available element in opts overrides the default. For the rest of the elements the value from defaultOpt is taken. A warning is issued for every element appearing in opts but not in defaultOpt (only if keepNotMatching==FALSE).

See Also

defaultSC, defaultOpts