waterbox | R Documentation |
Produces box plots from water data.
waterbox(
object,
parkcode = NA,
sitecode = NA,
charname = NA,
category = NA,
by = "year",
assessment = TRUE,
yname = NA,
xname = NA,
labels = NA,
title = NULL,
assesscolor = "red",
outliercolor = "blue",
sizes = c(2, 0.5, 1),
webplot = FALSE,
...
)
object |
Either a |
parkcode |
One or more parkcodes, in quotes. If |
sitecode |
One or more sitecodes, in quotes. If |
charname |
Name, in quotes, #' of a single |
category |
Name, in quotes, #' of a single category of characteristics whose data should be graphed. This is required unless
|
by |
Indicates how the data for the boxplot should be grouped. A character variable in quotes. Choices are:
|
assessment |
Vector indicating if assessment points will be drawn on the graph. See details below. |
yname |
Text, defaults to |
xname |
Text, defaults to |
labels |
A character vector indicating the labels for the bars, defaults to NA. If labels are provided (one for each bar) they
will be printed. If |
title |
A title for the graph in quotes. Defaults to |
assesscolor |
a length one character vector with the color for the assessment lines. |
outliercolor |
a length one character vector with the color for the outlier points. |
sizes |
a length 3 numeric vector with the sizes for the outlier points, lines of the boxplot and assessment lines. |
webplot |
If TRUE, the plot is produced using ggploty from the ploty package. Will produce a html plot with interactive features. |
... |
Additional arguments used to select and filter data passed to |
The assessment
argument determines if lines representing the assessment points should be drawn on the graph.
If FALSE
then no lines will be drawn. If TRUE
, the default, then the upper and lower assessment points indicated
in object
's Character
objects will be used to draw the lines. Note that if there are multiple assessment points,
for example if different sites have different points, or if there is both an upper and lower point, they will all be drawn. If
a vector
of numbers is passed to assessment
instead then those will serve as the assessment points and lines will
be drawn accordingly. Note that if obejct
is a data.frame
then the only way to draw assessment points is by passing
a numeric vector
to assessment
.
Creates a boxplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.