[R] Simulation

Wacek Kusnierczyk Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Fri May 15 19:51:36 CEST 2009


Greg Snow wrote:
> Another possibility (maybe more readable, gives the option of a list, probably not faster):
>
> Replicate(1000, rexp(15,1) )
>
>   

provided that simplify=FALSE:

    is(replicate(10, rexp(15, 1)))
    # "matrix" ...

    is(replicate(10, rexp(15, 1), simplify=FALSE))
    # "list" ...

vQ




More information about the R-help mailing list