PosBinFilter {SigWinR} | R Documentation |
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().
PosBinFilter(x, y, steps)
x |
The positions of the samples |
y |
The sample values |
steps |
The number of values in the new sequence |
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.
This one possible way to achieve a regular sampling. More elaborate and clever methods might be needed in specific situations.
Wim de Leeuw <w.c.deLeeuw@uva.nl>
Ridgeogram()
x <- rnorm(300,sd=3) plot(PosBinFilter(x,sin(x),50),t="l")