plot_fl | R Documentation |
plot_fl
provides methods to plot the falling limb of a
chlorine residual time series plot. This function will be useful for
trying to visualize how selected parameters such as rolling_window
effect the grouping of data points
plot_fl(
data,
date_col,
value_col,
...,
rolling_window = 8,
max_chlorine = 1.5,
smooth_deriv = FALSE,
deriv_window = NULL,
date_breaks = "6 months",
date_labels = "%b %d, %Y",
ylab = "",
ylim = NULL,
plot_title = "",
plot_subtitle = "",
include_first = FALSE,
first_ylim = NULL,
theme = NULL,
nitrite_col,
nitrite_ylab = "Nitrite",
nitrite_ylim = NULL,
ncol = NULL,
nrow = NULL
)
data |
a data frame containing chlorine residual results |
date_col |
unqouted column name of date time column in data |
value_col |
unquoted column name of chlorine column in data |
... |
unqouted column name(s) of grouping variable(s) |
rolling_window |
how many weeks of data should be included in the rolling average window function when calculating the first and second derivative of the chlorine time series. Defaults to 8. |
max_chlorine |
maximum chlorine residual value that can be included in falling limb. For example, if you are not concerned with sites when chlorine is greater than 1.5 (default) than no value greater than this threshold will be classified as either "Falling Limb" or "Nitrification Ongoing" |
date_breaks |
a character string to be passed to either
|
date_labels |
a character string specifying the desired output
format of dates on x axis. See |
ylab |
a character string specifying the y axis label for the main plot |
ylim |
a vector of length two specifying the limits of the y axis for the chlorine plot. If NULL (default) default ggplot2 limits will be used |
plot_title |
a character string specifying the title of the plot |
plot_subtitle |
a chacter string specifying the subtitle of the plot |
include_first |
logical; should a plot of the first derivative and its moving average be included along with the main trend? |
first_ylim |
a vector of length two specifying the limits of the y axis for the first derivative of chlorine plot. If NULL (default) default ggplot2 limits will be used |
theme |
a |
nitrite_col |
column name (optional) of column containing nitrite
data that corresponds with the chlorine data. This will be plotted
alongside the chlorine data via the |
nitrite_ylab |
character string that specifies the y label for the nitrite graph. Only used if nitrite_col is specified |
nitrite_ylim |
a vector of length two specifying the limits of the y axis for the nitrite plot. If NULL (default) default ggplot2 limits will be used |
ncol, nrow |
If grouping variable is specified, these arguments set the number of columns and rows, respectively of the resultant facetted plot |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.