[R] loess documentation

Bill Simpson wsi at gcal.ac.uk
Fri Nov 17 10:18:14 CET 2000


do this:
help.start()
click on
Search Engine & Keywords
search for "smooth"

You will find various smoothing methods. Sounds like ksmooth is something
you'd like.

It sounds to me you'd like some simple filtering. If so, just convolve
your data with the filter you want to pass it through (lowpass, bandpass).

out = x * h, where x is input, h is filter, and * is convolution

Use convolve().  Here is an example:
#Bracewell The Fourier transform and its applications, chap 3 (p.32 in 2nd
#edition): {2 2 3 3 4} * {1 1 2} = {2 4 9 10 13 10 8}
x<-c(2,2,3,3,4)
h<-c(1,1,2)
out<-convolve(x,rev(h),type="o") #need to do rev due to fault in R code

I pointed it out several times to the R-developers that convolve() should
do convolution by default! However they prefer it to do correlation by
default (which makes no sense to me). Anyway the workaround is to use
rev(h).

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list