View source: R/boxplot.SpatialStreamNetwork.R
boxplot.SpatialStreamNetwork | R Documentation |
The boxplot
function creates box-and-whisker plots for data within
SpatialStreamNetwork-classobjects.
## S3 method for class 'SpatialStreamNetwork' boxplot(x, variable, ...)
x |
an object of class SpatialStreamNetwork-class |
variable |
the variable (in quotes) for which the boxplots are being created,
or a formula, such as |
... |
see |
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.
A graph is produced, and a list with the following components:
stats |
a 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. |
n |
a vector with the number of observations in each group. |
conf |
a matrix where each column contains the lower and upper extremes of the notch. |
out |
the values of any data points which lie beyond the extremes of the whiskers. |
group |
a vector of the same length as out whose elements indicate to which group the outlier belongs. |
names |
a vector of names for the groups |
Jay Ver Hoef support@SpatialStreamNetworks.com
see boxplot
boxplot.stats
library(SSN) #for examples, copy MiddleFork04.ssn directory to R's temporary directory copyLSN2temp() # NOT RUN # Create a SpatialStreamNetork object that also contains prediction sites #mf04 <- importSSN(paste0(tempdir(),'/MiddleFork04.ssn'), # predpts = "pred1km", o.write = TRUE) #use mf04 SpatialStreamNetwork object, already created data(mf04) #for examples only, make sure mf04p has the correct path #if you use importSSN(), path will be correct mf04 <- updatePath(mf04, paste0(tempdir(),'/MiddleFork04.ssn')) boxplot(mf04, "Summer_mn") boxplot(mf04, Summer_mn ~ STREAMNAME, main = "Summer_mn ~ STREAMNAME", col = "gray", xlab = "STREAMNAME", ylab = "Summer Mean Temperature")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.