Learn R Programming

wqtrends (version 1.5.1)

anlz_avgseason: Extract period (seasonal) averages from fitted GAM

Description

Extract period (seasonal) averages from fitted GAM

Usage

anlz_avgseason(mod, doystr = 1, doyend = 364, yromit = NULL)

Value

A data frame of period averages

Arguments

mod

input model object as returned by anlz_gam

doystr

numeric indicating start Julian day for extracting averages

doyend

numeric indicating ending Julian day for extracting averages

yromit

optional numeric vector for years to omit from the output

Examples

Run this code
library(dplyr)

# data to model
tomod <- rawdat %>%
  filter(station %in% 34) %>%
  filter(param %in% 'chl') %>% 
  filter(yr > 2015)

mod <- anlz_gam(tomod, trans = 'log10')
anlz_avgseason(mod, doystr = 90, doyend = 180)

Run the code above in your browser using DataLab