Description Usage Arguments Details Value Note Author(s) Examples
Retrieves the number of species and sites for each partition and plots a box according to its dimension.
1 2 | ## 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.