Learn R Programming

SSN (version 1.1.4)

boxplot.SpatialStreamNetwork: Box-and-whisker plots for data within SpatialStreamNetwork objects.

Description

The boxplot function creates box-and-whisker plots for data within SpatialStreamNetwork-classobjects.

Usage

## S3 method for class 'SpatialStreamNetwork':
boxplot(x, variable, ...)

Arguments

x
an object of class SpatialStreamNetwork-class
variable
the variable (in quotes) for which the boxplots are being created, or a formula, such as y ~ grp, where y is a numeric vector of data values and grp is a grouping of variables (usually a factor).
...
see boxplot for additional arguments

Value

  • A graph is produced, and a list with the following components:
  • statsa matrix, each column contains the extreme of the lower whisker, the lower hinge, the median, the upper hinge and the extreme of the upper whisker for each group/plot. If all the inputs have the same class attribute, then so will this component.
  • na vector with the number of observations in each group.
  • confa matrix where each column contains the lower and upper extremes of the notch.
  • outthe values of any data points which lie beyond the extremes of the whiskers.
  • groupa vector of the same length as out whose elements indicate to which group the outlier belongs.
  • namesa vector of names for the groups

Details

boxplot is a generic function that has been adapted for SpatialStreamNetwork-classobjects. Use names to get a list of the variable names within the SpatialStreamNetwork object; the boxplot boxplot will only work for the observed data set.

References

see boxplot

See Also

boxplot.stats

Examples

Run this code
library(SSN)
# NOT RUN 
# mf04 <- importSSN(system.file("lsndata/MiddleFork04.ssn", 
#	        package = "SSN"), o.write = TRUE)
# use SpatialStreamNetwork object mf04 that was already created
data(mf04)

boxplot(mf04, "Summer_mn")
boxplot(mf04, Summer_mn ~ STREAMNAME, main = "Summer_mn ~ STREAMNAME", 
      col = "gray", xlab = "STREAMNAME", ylab = "Summer Mean Temperature")

Run the code above in your browser using DataLab