【发布时间】:2020-11-12 19:52:25
【问题描述】:
这是我当前的代码...我可以将其设为 for 循环吗?
#sample1, sample2, …, sample6 where samplei is sampling 10^(ith)
sample1 <- abs(rnorm(10)) #use abs because bellcurve is + and -
sample2 <- abs(rnorm(10^2))
sample3 <- abs(rnorm(10^3))
sample <- abs(rnorm(10^4))
sample5 <- abs(rnorm(10^5))
sample6 <- abs(rnorm(10^6))
【问题讨论】:
-
sapply(1:6, function(x)abs(rnorm(10^x)))