R/fitted.timetrack.R

Defines functions `fitted.timetrack`

`fitted.timetrack` <-
    function(object, which = c("passive", "ordination"),
             model = NULL, choices = 1:2, ...)
{
    if(missing(which))
        which <- "passive"
    which <- match.arg(which)
    model <- if(is.null(model)) {
        if(is.null(object$ordination$CCA)) "CA" else "CCA"
    }
    if(isTRUE(all.equal(which, "passive"))) {
        fit <- fitted(unclass(object), ...)[, choices, drop = FALSE]
    } else {
        fit <- fitted(object$ordination, model = model,
                      ...)[, choices, drop = FALSE]
      }
    fit
}

Try the analogue package in your browser

Any scripts or data that you put into this service are public.

analogue documentation built on June 21, 2021, 1:08 a.m.