modarg {plgraphics} | R Documentation |
Makes it easy to modify one or a few elements of a vector or list of default settings. This function is to be used within functions that contain vectors of control arguments such as colors for different elements of a plot
modarg(arg = NULL, default)
arg |
named vector or list of the elements that should override the settings in 'default' |
default |
named vector or list of default settings |
Same as the argument 'default' with elements replaced according to 'arg'
Werner A. Stahel
modarg(2, list(a=4, b="bb", c=NA)) modarg(c(b=2, d=6), c(a="4", b="bb", c=NA)) ## This leads to a warning ## modarg(c(b=2, d=6), c(a="4", b="bb", c=NA)) ## modarg(1:6, c(a="4", b="bb", c=NA))