R/plot.betadiversity.R

"plot.betadiversity" <-
function (x, type = "b", xlab, ylab, splines = FALSE,  ...) 
{
    i <- order(x$x)
    if (missing(xlab)) 
        xlab <- "Gradient"
    if (missing(ylab)) 
        ylab <- "Beta Diversity"
    i <- order(x$x)
    xy <- unique(cbind(x$x[i], x$beta[i]))
    plot(xy, type = "n", xlab = xlab, ylab = ylab, ylim = c(0, 
        max(x$beta)), ...)
    if (type == "b" || type == "p") 
        points(xy, ...)
    if (type == "b" || type == "l") {
        if (splines)
            lines(spline(xy), ...)
        else 
            lines(xy, ...)
    }
    invisible()
}

Try the gravy package in your browser

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

gravy documentation built on May 2, 2019, 4:46 p.m.