我从含有许多值的列表的文件采样的R循环,例如:构建为随机采样
312313.34
243444
12334.92
321312
353532
和,使用R随机地从该列表中进行采样:
list = read.table("data")
out <-sample(list,50,replace=TRUE)
out.mean<-mean(out)
out.mean
可能有人请告诉我如何将它放入一个循环中,以便我可以执行此过程1000次,并采用这意味着这将产生的意思?
非常感谢您提前!
Rubal
[from given distribution](http://stackoverflow.com/questions/12128996/sample-from-given-distribution) – Andrie