Displaying 1 result from an estimated 1 matches for "testdat2".
Did you mean:
testdata
2010 Sep 29
2
resampling issue
...Age Length
2 200
5 450
6 600
7 702
8 798
5 453
4 399
1 120
2 202
Here is my code which resamples my data to produce up to 9 different samples
and creates a new dataset of 12 samples:
testdat<-growth[sample(9,12,replace=T),]
Now I want R to repeat this procedure 5 times. Here is my code:
testdat2 <- replicate(5, sample(testdat), simplify=F)
testdat2
Here is my output showing that it did it once and then just repeated the
values:
> testdat2
[[1]]
Age Length
1 2 200
9 2 202
8 1 120
5 8 798
4 7 702
6 5 453
1.1 2 200
4.1 7 702
4....