Linear detrending of time series

linear_detrend(time_series, dates)

Arguments

time_series

A numeric vector containing a raw environmental time series.

dates

An object of class Date of format YYYY-MM-DD (must be in progressive chronological order).

Value

A data.frame containing a numeric vector of the time (in days) for each observation in time_series starting at day 0, and a numeric vector containing the residual variation of time_series after removing the linear trend.

See also

Author

Diego Barneche and Scott Burgess.