Thanks Pascal, The good new is the code works, but it doesn't produce the result that I expected, or at least it doesn't match what matlab does. I did a bit of search myself and came across the following post on stackoverflow
http://stackoverflow.com/questions/7746529/smoothing-with-lowess Which I cannot decipher it. Do you have any suggestion? On 3/9/12 1:42 AM, "Pascal Oettli" <kri...@ymail.com> wrote: Hi Robert, You can try ?lowess Regards, Pascal ----- Mail original ----- De : "Faryabi, Robert (NIH/NCI) [F]" <babak.fary...@nih.gov> À : "r-help@r-project.org" <r-help@r-project.org> Cc : Envoyé le : Vendredi 9 mars 2012 8h43 Objet : [R] Moving average with loess Hello All, I just have a very simple question. I recently switching from Matlab to R, so cannot figure out some of the easy tasks in the new environment. Is there any weighted local regression smoothing in R? Basically, I want to have weighted moving average. All the functions that I know of need two variables for fitting. Best, Robert ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.