Re: [R] looking for function like rollmean()

2007-11-24 Thread Chuck Cleland
Jonas Stein wrote: > Hi, > > i have some data, that has 1-5 % noise. > I want to smooth this data without loosing rows. > > rollmean() would be great, but it returns a vector of different size as the > initial vector. You might consider one of the smoothers in smooth() from the stats package.

Re: [R] looking for function like rollmean()

2007-11-23 Thread Gabor Grothendieck
If you are referring to rollmean in the zoo package then na.pad = TRUE will cause the output to be the same length as the input: > library(zoo) > rollmean(zoo(1:10), 3, na.pad = TRUE) 1 2 3 4 5 6 7 8 9 10 NA 2 3 4 5 6 7 8 9 NA > rollmean(zoo(matrix(1:10, 5)), 3, na.pad = TRUE) 1

[R] looking for function like rollmean()

2007-11-23 Thread Jonas Stein
Hi, i have some data, that has 1-5 % noise. I want to smooth this data without loosing rows. rollmean() would be great, but it returns a vector of different size as the initial vector. -- kind regards, Jonas Stein <[EMAIL PROTECTED]> __ R-help@r-pr