R/ordibubble.R

Defines functions `ordibubble`

`ordibubble` <-
function(ordiplot,var,...) {
    y2 <- abs(var)
    ordiscores <- scores(ordiplot, display="sites")
    for (i in 1:length(var)) {
        if (var[i] < 0) {
            var[i] <- NA
        }else{
            y2[i] <- NA
        }
    }
    if (sum(var,na.rm=T) > 0) {graphics::symbols(ordiscores[,1], ordiscores[,2], circles=var, add=T,...)}
    if (sum(y2,na.rm=T) > 0) {graphics::symbols(ordiscores[,1], ordiscores[,2], squares=y2, add=T,...)}
}

Try the BiodiversityR package in your browser

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

BiodiversityR documentation built on Jan. 6, 2023, 5:18 p.m.