GeoBoxPlot | R Documentation |
Make a geographic box plot as detailed in Willmott et al. (2007).
GeoBoxPlot(x, areas, ...)
x |
numeric giving the values to be box-plotted. |
areas |
numeric of same length as x giving the associated areas for each value. |
... |
optional arguments to the |
This function makes the geographic box plots described in Willmott et al. (2007) that calculates the five statistics in such a way as to account for the associated areas (e.g., over a grid where each grid box may have differing areas).
Missing values are not handled, and ideally should be handled before calling ths routine.
In future, this function may allow other options for x
than currently, but for now, only numeric vectors are allowed.
List with the same components as returned by boxplot
.
Eric Gilleland
Willmott, C. J., Robeson, S. M. and Matsuura, K. (2007) Geographic box plots. Physical Geography, 28, 331–344, doi:10.2747/0272-3646.28.4.331.
boxplot
##
## Reproduce the boxplots of Fig. 1 in Willmott et al. (2007).
##
x <- c(4,9,1,3,10,6,7)
a <- c(rep(1,4),2,1,3)
boxplot( x, at=1, xlim=c(0,3))
GeoBoxPlot(x, a, at=2, add=TRUE)
axis( 1, at=c(1,2), labels=c("Traditional", "Geographic"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.