boxes {simba}R Documentation

An adaption of boxplot.n.

Description

Uses boxplot to produce a boxplot, which is then annotated with the number of obbservations in each group. Does allow for more flexibility compared to boxplot.n. Default size of the text is bigger and per default the numbers are not plotted directly on the x-axis and their distance from the axis can be changed.

Usage

boxes(..., top = FALSE, shrink = 1, textcolor = NULL, yadj = NULL)

Arguments

... Parameters passed to boxplot.
top Should the numbers of observations be printed below or above the boxes? Defaults to below (top = FALSE).
shrink Parameter to scale the size of the numbers of observations. Above 1 increases size, below 1 until 0 decreases size.
textcolor Color of the text. Defaults to NULL which than uses the actual plotting colour of the graphics device.
yadj Can be used to adjust the vertical plotting positions of the numbers of observations. Defaults to NULL - no adjustment.

Author(s)

Gerald Jurasinski

See Also

boxplot, plot, boxplot.n

Examples


data(abis)

## see environmental data (see documentation on data for details)
abis.env

## calculate the difference in similarities for the three major  
## vegetation types
## therefore created a vector from the data expressing belonging
## to the vegetation types:
tcs.sub <- rep(0, 61)
tcs.sub[abis.env[,29]==1] <- 1
tcs.sub[abis.env[,30]==1] <- 2
tcs.sub[abis.env[,31]==1] <- 3

## calculate similarity (Jaccard) between all pairs of plots
abis.jacc <- sim(abis.spec, method="jaccard")

## make boxplots regarding the similarities for each vegetation
## type, including the number of pairs contained in each box.
boxes(as.matrix(abis.jacc)~tcs.sub, shrink=1.2)

## prettier
boxes(as.matrix(abis.jacc)~tcs.sub, notch=TRUE, col="grey50", 
shrink=1.2, ylim=c(-0.1, 0.9))


[Package simba version 0.2-5 Index]