Learn R Programming

dateutils (version 0.1.5)

try_trend: Estimate low frequnecy trends

Description

Estimate low frequency trends via loess regression. If the function errors, return zeros (i.e. no trend)

Usage

try_trend(x, outlier_rm = TRUE, span = 0.6)

Arguments

x

data

outlier_rm

T/F, remove outliers to estimate trends?

span

span for the loess regression

Value

Estimated trend in the data

Examples

Run this code
# NOT RUN {
try_trend(c(1,3,6,7,9,11,14,15,17,18))
# }

Run the code above in your browser using DataLab