Description Usage Arguments Details Value Examples
View source: R/detrendHeight.R
Fits a straight line to a vector of values using lm(), and uses the regression coefficients to subtract off the linear trend from the values.
1 |
pt |
A vector of numeric values to be detrended |
Typically this is used to remove a tidal trend from a ocean surface height time series before attempting to calculate statistics for waves, which are variations above and below the mean surface height. Returns a series of residuals around the linear trend, in the original units of measurement (typically meters).
A list containing the following:
pt
A vector of detrended values
seg_len
The segment length used
h
The mean height of the water column
trend
A two element vector of the intercept and slope
from the linear regression.
1 2 3 4 5 |
Loading required package: ggplot2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.