PosBinFilter {SigWinR}R Documentation

Bin filter

Description

Function meant as in input filter to Rigeogram or RigeoPic to generate Rigeograms of non-regularly sampled data. Filter a sequence sampled at arbitrary positions to generate samples at regular intervals which can serve as input to Rigeogram() or Ridges().

Usage

PosBinFilter(x, y, steps)

Arguments

x The positions of the samples
y The sample values
steps The number of values in the new sequence

Value

The function returns a list of length steps. The signal is approximated over the range of values in x in bins equal length. For each bin the median value of the sample values found in the bin is calculated. If no signal values are found in the interval the mean value of the bins containing values is inserted.

Note

This one possible way to achieve a regular sampling. More elaborate and clever methods might be needed in specific situations.

Author(s)

Wim de Leeuw <w.c.deLeeuw@uva.nl>

See Also

Ridgeogram()

Examples

        x <- rnorm(300,sd=3)
        plot(PosBinFilter(x,sin(x),50),t="l")

[Package SigWinR version 1.0 Index]