a4aGr | R Documentation |
Class definition (slots), constructors, accessors, replacement (when relevant) and common methods.
a4aGr(object, ...)
## S4 method for signature 'missing'
a4aGr(object, ...)
grMod(object, ...)
## S4 method for signature 'a4aGr'
grMod(object)
grMod(object) <- value
## S4 replacement method for signature 'a4aGr,formula'
grMod(object) <- value
grInvMod(object, ...)
## S4 method for signature 'a4aGr'
grInvMod(object)
grInvMod(object) <- value
## S4 replacement method for signature 'a4aGr,formula'
grInvMod(object) <- value
## S4 method for signature 'a4aGr'
params(object)
## S4 replacement method for signature 'a4aGr,FLPar'
params(object) <- value
## S4 method for signature 'a4aGr'
distr(object)
## S4 replacement method for signature 'a4aGr,character'
distr(object) <- value
## S4 method for signature 'a4aGr'
vcov(object)
## S4 replacement method for signature 'a4aGr,numeric'
vcov(object) <- value
object |
object of relevant class (see signature of method) |
... |
additional argument list that might never be used |
value |
the new object |
grMod
the formula for the growth model, e.g. von Bertallanffy
grInvMod
the formula for the inverse of the growth model, having length as the independent variable
params
an FLPar object with the parameters of the model; must match the equations in the models
vcov
an array with the variance covariance matrix of the parameters
distr
a character with the parameters' statistical distribution; it must match a known distribution for R (e.g. "norm" for gaussian), so that rnorm
can be called
All slots in the class have accessor and replacement methods defined that allow retrieving and substituting individual slots.
The values passed for replacement need to be of the class of that slot. A numeric vector can also be used when replacing FLQuant slots, and the vector will be used to substitute the values in the slot, but not its other attributes.
A construction method exists for this class that can take named arguments for
any of its slots. All slots are then created to match the requirements of the
class validity. If an unnamed FLQuant
object is provided, this is used
for sizing, but not for populating any slot.
mm <- matrix(NA, ncol=3, nrow=3)
diag(mm) <- c(50, 0.001,0.001)
mm[upper.tri(mm)] <- mm[lower.tri(mm)] <- c(0.1,0.01,0.00004)
md <- ~linf*(1-exp(-k*(t-t0)))
imd <- ~t0-1/k*log(1-len/linf)
prs <- FLPar(linf=58.5, k=0.086, t0=0.001, units=c("cm","yr^-1","yr"))
vbObj <- a4aGr(grMod=md, grInvMod=imd, params=prs, vcov=mm, distr="norm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.