Skip to content
Prev 293807 / 398503 Next

Repeating

I don't see anything that looks like it should throw an error, but I
haven't tested your code without "data1" and "id" -- you might look at
? replicate() though -- it's designed for these sorts of things. E.g.,

replicate(100, mean(rexp(50)))

gets me a hundred draws of the mean of 50 random exponential variates
(could be done faster here with some matrix tricks, but that's the
idea)

Michael
On Mon, May 7, 2012 at 6:28 AM, efulas <ef_ulas at hotmail.com> wrote: