slope_auto: Bluehill style Automatic Slope

View source: R/utility_functions.R

slope_autoR Documentation

Bluehill style Automatic Slope

Description

Uses the Bluehill Automatic Slope algorithm 1. divide the series into six segments 2. calculate the slope for each segment 3. sum adjacent pairs of slope (1 + 2, 2 + 3 ... 5 + 6) 4. find the pair with the maximum sum 5. return the maximum slope in that pair This version uses lm_simple to return other useful statistics

Usage

slope_auto(DT, formula)

Arguments

DT

a data.table to analyse

formula

a standard R formula specifying which columns to use

Value

A named list(int, slope, p, rsq) for the segment with maximum slope


yadbor/bluer documentation built on Jan. 31, 2023, 7:44 p.m.