detrend: detrend

Description Usage Arguments Details Value Author(s) Examples

Description

Simple removal of mean and trend from a time series.

Usage

1
detrend(.data)

Arguments

.data

A data.frame containing variable 'Time' as the first column and a second-column from which to remove the mean and trend.

Details

Input must be a data.frame where the first column is 'Time' and the second is the variable from which to remove the mean and trend. Removing the mean often provides less numerical inaccuracy, and removing a trend (for spectral analysis) avoids the effect of a ramp function on an fft-produced spectrum for which the time series is assumed repetitive. For this calculation, NA values are replaced by interpolation or, where that is not possible, by zeroes.

Value

A modified version of data[, 2] only, with mean and trend removed.

Author(s)

William Cooper

Examples

1
AT <- detrend (RAFdata[, c('Time', 'ATX')])

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.