This function uses a GAM to smooth a numeric vector
Usage
GAM_smoothing(values, years = 1:length(values), plot = FALSE, ...)Arguments
- values
A numeric vector that will be smoothed
- years
Optional, the years that
valuecorresponds to as a numeric vector.- plot
If
TRUEa plot is generated showing the smoothed spline.- ...
other arguements passed to
mgcv::gam