modarg | 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'.
See the source code of plmboxes.default
for a typical application.
Werner A. Stahel
modarg(c(b="B", c=0), list(a=4, b="bb", c=NA))
df <- ploptions("linewidth")
cbind(df, modarg(c(dot=1.4, dashLongDot=1.3), df))
## These statements lead 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.