R/aoplot.default.R

Defines functions aoplot.default

Documented in aoplot.default

aoplot.default <- 
function(x, log=TRUE, xlab, ylab, ...) {
    x <- as.matrix(x)
    A <- AA <- colSums(x)
    O <-  colSums(x > 0)
    lx <- ly <- 0:max(O)
    if (missing(xlab))
        xlab <- "Occurrence"
    if (missing(ylab))
        ylab <- ifelse(log, "log10 Abundance", "Abundance")
    if (log) {
        AA <- log10(AA)
        ly <- log10(ly)
    }
    plot(O, AA, ylog=TRUE, xlab=xlab, ylab=ylab, ...)
    lines(lx, ly, lty=2)
    invisible(cbind(A, O))
}

Try the mefa package in your browser

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

mefa documentation built on Oct. 7, 2021, 9:11 a.m.