LocalGaussFilter: LocalGaussFilter

Description Usage Arguments Details Value Examples

View source: R/LocalGaussFilter.R

Description

This function takes a signal and applies moving means and SDs to it of a particular window (n). It then scales the data by subtracting from each point the average of the previous values in the window and dividing by their SD. The absolute value is then taken and a threshold (threshold) is applied to determine the signal.

Usage

1
LocalGaussFilter(x, n, threshold, robust = FALSE)

Arguments

x

A vector of numerical values

n

The width of the window to perform rolling calculations on

threshold

The threshold beyond which the normalized data is considered signal

robust

(not implemented)

Details

A robust option using rolling median and MAD is yet to be implemented

Value

A new numerical vector of thresholded values

Examples

1
2
x <- rnorm(1000000)
y <- LocalGaussFilter(x, n = 100, threshold = 3)

Zansors/zdeviceR documentation built on Dec. 25, 2019, 12:23 a.m.