Sampling from vectors¶
set.seed(143)
sample(1:9)
[1] 8 6 4 1 7 2 9 5 3
sample(1:1000,size=20)
[1] 658 171 191 428 806 768 307 120 506 340 190 962 437 274 477 935 363 469 933
[20] 79
sample(6,size=10,replace=TRUE)
[1] 4 5 3 2 1 5 1 6 1 2
- R file: sampling-from-vectors.R
- Rmarkdown file: sampling-from-vectors.Rmd
- Jupyter notebook file: sampling-from-vectors.ipynb
- Interactive version of the Jupyter notebook (shuts down after 60s):
- Interactive version of the Jupyter notebook (sign in required):