fill {vegsoup} | R Documentation |
Calculates the proportion (percentage) of all non zero elements in a species matrix.
fill(obj)
obj |
|
returns a vector of length one and mode "numeric"
Roland Kaiser
nestedtemp
in vegan for nestedness indices.
require(vegsoup) data(barmstein) fill(barmstein) # relation of matrix fill and number of occurences data(windsfeld) # unify layer and transform to presence/absence x <- compress(windsfeld) # number of occurences jj <- colSums(x) i <- sort(unique(jj)) # compute matrix fill for each occurence treshold r <- t(sapply(i, function (y) { xi <- x[ , match(names(jj[ jj >= y ]), colnames(x)) ] c(dim(xi), fill(xi)) })) par(mfrow = c(2,2)) plot(i, r[, 1], type = "b", xlab = "occurence threshold", ylab = "number of sites") plot(i, r[, 2], type = "b", xlab = "occurence threshold", ylab = "number of species") plot(i, r[, 1] / r[, 2], type = "b", xlab = "occurence threshold", ylab = "number of sites / number of species") plot(i, r[, 3], type = "b", xlab = "occurence threshold", ylab = "matrix fill") dev.off()