Thanks for those who replied!
I found out the problem. I don't need the nested loop at all. The
following code would've worked (for those who're interested to know):
#
## Testing CLT. pp 281 of Chance Encounters
x - round(runif(1000, 1, 6))
clt - function(x, samp.no = 5, n = 5) {
samp -
Hi,
Apologies for such a trivial question, but it has been over two years since
I last used nested loops and I'm ashamed to say that I forgot how they work
*_*
Suppose I've the following codes:
#
x - round(runif(1000, 1, 6))
samp5 - vector(mode = list, length = 5)
for(i in 1:5) {