show_prdseries {wqtrends} | R Documentation |
Plot predictions for GAMs over time series
Description
Plot predictions for GAMs over time series
Usage
show_prdseries(
mod,
ylab,
yromit = NULL,
alpha = 0.7,
base_size = 11,
xlim = NULL,
ylim = NULL,
col = "brown"
)
Arguments
mod |
input model object as returned by |
ylab |
chr string for y-axis label |
yromit |
optional numeric vector for years to omit from the plot, see details |
alpha |
numeric from 0 to 1 indicating line transparency |
base_size |
numeric indicating base font size, passed to |
xlim |
optional numeric vector of length two for x-axis limits |
ylim |
optional numeric vector of length two for y-axis limits |
col |
optional chr string for line color |
Details
The optional yromit
vector can be used to omit years from the plot. This may be preferred if the predicted values from the model deviate substantially from other years likely due to missing data.
Value
A ggplot
object
Examples
library(dplyr)
# data to model
tomod <- rawdat %>%
filter(station %in% 34) %>%
filter(param %in% 'chl')
mod <- anlz_gam(tomod, trans = 'log10')
show_prdseries(mod, ylab = 'Chlorophyll-a (ug/L)')
[Package wqtrends version 1.5.1 Index]