Learn R Programming

FIACH (version 0.1.2)

hampel: Hampel Filter

Description

This function Hampel Filters each column of a matrix.

Usage

hampel(x,k=3,t0=3)

Arguments

x
Numeric Matrix where the columns are to be filtered.
k
Window width. Note that the window is symmetric around the i^th element with a total of 2*k+1 elements.
t0
Threshold, expressed in Median Absolute Deviations. Note that setting the threshold to 0 creates a Median filter.

Value

Returns a matrix containing the filtered data

Examples

Run this code
mat<-matrix(rnorm(100*100),ncol=100)
a<-hampel(mat)

Run the code above in your browser using DataLab