[R] sum(rnorm(n)), calculate more efficiently

Karsten D Bjerre kdb at kvl.dk
Wed Nov 20 16:58:38 CET 2002


I want to simulate the end point of a one-dimensional brownian motion going on for many timesteps (n very large). 
Can this be done more efficiently than (effect of drift excluded): 
endpoint <- sum(rnorm(n))

Thanks in advance!
Karsten



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