rectangles {vegsoup} | R Documentation |
Retrieves the number of species and sites for each partition and plots a box according to its dimension.
## S4 method for signature 'VegsoupPartition' rectangles(obj, plot = TRUE, ...)
obj |
|
plot |
If |
... |
graphical parameters. See ‘Details’. |
A lying box indicates species poor and an upright box highlights species rich partitions. Currently graphical parameters can only be passed to rect
. The functions adds a additional rug-like line to marking partitions that contain only one site. See argument polish
in function VegsoupPartition
to get rid of singletons in your analysis.
Returns a matrix
with two columns as returned by dim(obj[partitioning(obj) == i,])
, where i
is a specific partition. The first column shows number of plots and the second column shows number of species.
Any warnings that typically arise when a single partition is subsetted from an object are silenced. These warnings are harmless and not of interest at this point.
Roland Kaiser
require(vegsoup) data(windsfeld) x <- VegsoupPartition(windsfeld, k = 20) rectangles(x) # add color to the boxes rectangles(x, col = rgb(0,0,0,0.2)) # return matrix only r <- rectangles(x, plot = FALSE) # use polish = TRUE x <- VegsoupPartition(windsfeld, k = 10, polish = TRUE) # add fancy colors to the boxes require(RColorBrewer) rectangles(x, plot = TRUE, col = rgb(0,0,0,0.2), border = RColorBrewer::brewer.pal(getK(x), "Spectral"), lwd = 2)