在R中模拟布朗运动

通过模拟n = 1000点来绘制[0,1]上的布朗运动模拟和路径。我生成以下代码:

 n <- 1000
 t <- 1
 bm <- c(0, cumsum(rnorm(n,0,sqrt(t/n))))
 steps <- seq(0,t,length=n+1)
 plot(steps,bm,type="l")

因此,我需要在[0,100]时间间隔内模拟标准布朗运动的50个采样路径,并在图形中显示所有轨迹。