waterseries | R Documentation |
Produces a time series plot from water data.
waterseries(
object,
parkcode = NA,
sitecode = NA,
charname = NA,
category = NA,
by = "char",
assessment = TRUE,
layers = c("points", "line"),
xname = NA,
yname = NA,
labels = NA,
title = NULL,
colors = NA,
assesscolor = "red",
sizes = c(3, 0.8, 1.1),
censored = FALSE,
deseason = FALSE,
legend = "bottom",
webplot = FALSE,
...
)
object |
Either a |
parkcode |
One or more parkcodes, in quotes. If |
sitecode |
One or more sitecodes, in quotes. If |
charname |
Required if |
category |
One or more categories of characteristics, in quotes. Only those categories of characteristics will be returned. |
by |
Indicates how the data for the plot should be grouped. A text variable in quotes. Choices are:
|
assessment |
Vector indicating if assessment lines will be marked on the graph. See details below. |
layers |
Defaults to c("points","line") Indicates which layers you wish to see on the plot. |
xname |
Text, defaults to |
yname |
Text, defaults to |
labels |
A character vector indicating the labels for the data series, defaults to |
title |
A title in the graph in quotes. Defaults to |
colors |
a character vector with the colors for the points and lines. |
assesscolor |
a length one character vector with the color for the assessment lines. |
sizes |
a length 3 numeric vector with the sizes for the points, line connecting the points and assessment lines. |
censored |
If |
deseason |
If |
legend |
a vector indicating where the legend position. Can be: "none","left","right","top","bottom" or a two element numeric vector. |
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 values should be drawn on the graph.
If FALSE
then no lines will be drawn. If TRUE
, the default, then the upper and lower 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 parks 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 values and lines will
be drawn accordingly. Note that if object
is a data.frame
then the only way to draw assessment lines is by passing a
numeric vector
to assessment
.
Creates a time series plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.