Learn R Programming

wqtrends (version 1.5.1)

anlz_perchg: Estimate percent change trends from GAM results for selected time periods

Description

Estimate percent change trends from GAM results for selected time periods

Usage

anlz_perchg(mod, baseyr, testyr)

Value

A data frame of summary results for change between the years.

Arguments

mod

input model object as returned by anlz_gam

baseyr

numeric vector of starting years

testyr

numeric vector of ending years

Details

Working components of this function were taken from the gamDiff function in the baytrends package.

Examples

Run this code
library(dplyr)

# data to model
tomod <- rawdat %>%
  filter(station %in% 34) %>%
  filter(param %in% 'chl')
  
mod <- anlz_gam(tomod, trans = 'log10')
anlz_perchg(mod, baseyr = 1990, testyr = 2016)

Run the code above in your browser using DataLab