inferArgs | R Documentation |
The primary purpose is for inferring argument settings from names derived from variables
occurring in a formula. For example, the default use is to infer limits for variables
without having to call them xlim
and ylim
when the variables in the formula
have other names. Other uses could easily be devised by specifying different variants
.
inferArgs(
vars,
dots,
defaults = alist(xlim = , ylim = , zlim = ),
variants = c(".lim", "lim")
)
vars |
a vector of variable names to look for |
dots |
a named list of argument values |
defaults |
named list or alist of default values for limits |
variants |
a vector of optional postfixes for limit-specifying variable names |
a named list or alist of limits. The names are determined by the names in defaults
.
If multiple variants
are matched, the first is used.
inferArgs(c('x','u','t'), list(t=c(1,3), x.lim=c(1,10), u=c(1,3), u.lim=c(2,4)))
inferArgs(c('x','u'), list(u=c(1,3)), defaults=list(xlim=c(0,1), ylim=NULL))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.