[R] random permuted block randomization

Greg Snow Greg.Snow at imail.org
Fri Jan 29 04:42:40 CET 2010


you might want to look at the rollmean function in the zoo package if you want a fixed window.  If you want a cumulative mean then you can do something like

> cumsum(x)/seq_along(x)

If neither of those work, then give us some more detail.

________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Ayesha [ayesha.diamondash at gmail.com]
Sent: Thursday, January 28, 2010 8:38 PM
To: r-help at r-project.org
Subject: Re: [R] random permuted block randomization

oki :D

and do you know if there is an inbuilt R pacakage that calculate moving
averages  over time?
i found this ,
"Calculate various moving averages (MA) of a series."
Usage

  SMA(x, n=10)
  EMA(x, n=10, wilder=FALSE)

but when i tried SMA , R wouldnt recognize it! and there isnt such a package
as SMA in the install packages list either.

--
View this message in context: http://n4.nabble.com/random-permuted-block-randomization-tp1401407p1401504.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.


More information about the R-help mailing list