How to use sample function to realize Random sampling in R language
This article will explain in detail how to use sample function to achieve random sampling in R language. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Using sample function to realize random sampling sample (x, size, replace = FALSE, prob = NULL)
The first parameter x: the extracted vector
The second parameter size: the number of decimates
The third parameter replace: whether it is put back, it will not be put back by default.
Vec