listWithDefaults {listWithDefaults} | R Documentation |
listWithDefaults
Description
Takes arguments as base::list
to create a list.
If any arguments are present in defaultList
, but absent in ..., then the values from defaultList
are used.
Usage
listWithDefaults(..., defaultList = NULL)
Arguments
... |
objects, must be named; alternatively a single argument may be provided in this position as a named list |
defaultList |
a named list containing the default values |
Note
Argument order is not controlled. Non-default arguments come first in the order specified followed by all default arguments.
Examples
listWithDefaults(defaultList=list(a=2,b=2))
listWithDefaults(a=1,defaultList=list(a=2,b=2))
listWithDefaults(b=1,defaultList=list(a=2,b=2))
listWithDefaults(a=1,b=1,defaultList=list(a=2,b=2))
listWithDefaults(list(a=1),defaultList=list(a=2,b=2))
[Package listWithDefaults version 1.2.0 Index]