argnames | R Documentation |
Functions to get and set “argument names” for
functions that take vectorised arguments. For example, the likelihood
function returned by make.bisse
takes a vector of six these
functions can be used to get the canonical names for these six
parameters, and also to set them to something more memorable. These
names are used by the constrain
function to specify
submodels.
argnames(x, ...)
argnames(x) <- value
## S3 method for class 'constrained'
argnames(x, ...)
## S3 replacement method for class 'constrained'
argnames(x) <- value
x |
A function taking a vector of parameters as its first argument. |
value |
Vector of names to set the argument names to. |
... |
Ignored arguments to future methods. |
Methods exist for all models: bisse
, geosse
, bd
,
yule
, mk2
, and mkn
. These are particulary useful
for mkn
as the number of parameters for the Q matrix can be
very large.
Richard G. FitzJohn
## Same example likelihood function as for \link{make.bisse}:
pars <- c(0.1, 0.2, 0.03, 0.03, 0.01, 0.01)
set.seed(4)
phy <- tree.bisse(pars, max.t=30, x0=0)
f <- make.bisse(phy, phy$tip.state)
argnames(f) # Canonical argument names (set by default)
## Names that might be more informative for a tall/short state
argnames(f) <- c("l.tall", "l.short", "m.tall", "m.short",
"q.tall.short", "q.short.tall")
argnames(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.