R/scores.betadisper.R

`scores.betadisper` <-
    function(x, display = c("sites", "centroids"),
             choices = c(1,2), ...)
{
    display <- match.arg(display, several.ok = TRUE)
    sol <- list()
    if("sites" %in% display)
        sol$sites <- x$vectors[, choices]
    if("centroids" %in% display) {
        if(is.matrix(x$centroids))
            sol$centroids <- x$centroids[, choices]
        else
            sol$centroids <- x$centroids[choices]
    }
    if (length(sol) == 1)
        sol <- sol[[1]]
    sol
}

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.