sgolay: Wrapper for Savistky-Golay filtering

View source: R/utils.R

sgolayR Documentation

Wrapper for Savistky-Golay filtering

Description

A closure which sets defaults frequently appropriate for DSF for p (filter order) and n (filter length). Allows the filter to be called with the simplier syntax later. e.g. sgolay(value, 1) returns the first derivative of the vector 'value'. Formals for sgolay and be reset after calculations performed on user data to determine ideal p and n. This behavior is not implemented yet.

Usage

sgolay(x, p, n, m)

Arguments

x

a numeric vector to be savitsky-golay filtered

p

the filter order to use. Defaults to 5. Must be odd and >2.

n

the number of measurements in the filter window. Defaults to 13.

m

the filter order. 0: smoothing only; 1: first derivative, 2: second derivative, etc.

Details

Savistky-Golay filtering is used for all smoothing and derivative calculations in dsfworld.

Value

a numeric vector, with a savistky-golay filter applied.


taiawu/dsfworld_package documentation built on June 18, 2024, 5:39 a.m.