[R] function running in package gregmisc

Xavier.Abulker@fimat.com Xavier.Abulker at fimat.com
Tue Jul 23 09:23:48 CEST 2002


Hello,
I've got a problem using the function "running" in package gregmisc

For example:

 test<-c(1,2,3,4,5)
running(test,fun=var,width=3) gives
1:1 1:2 1:3 2:4 3:5
 NA  NA   2   3   4

which is wrong because

 var(test[1:3])
[1] 1

Where am I wrong?
Thanks
Xavier

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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