R/lines.procrustes.R

`lines.procrustes` <-
    function(x, type=c("segments", "arrows"),  choices=c(1,2),
             truemean = FALSE, ...)
{
    type <- match.arg(type)
    X <- x$X[,choices, drop=FALSE]
    Y <- x$Yrot[, choices, drop=FALSE]
    if (truemean) {
        X <- sweep(X, 2, x$xmean[choices], "+")
        Y <- sweep(Y, 2, x$xmean[choices], "+")
    }
    if (type == "segments")
        ordiArgAbsorber(X[,1], X[,2], Y[,1], Y[,2], FUN = segments, ...)
    else
        ordiArgAbsorber(X[,1], X[,2], Y[,1], Y[,2], FUN = arrows, ...)
    invisible()
}

Try the vegan package in your browser

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

vegan documentation built on May 2, 2019, 5:51 p.m.