| bsample | R Documentation | 
sample without weird behaviour for length(x)==1.Identical to sample but when x is an integer it just returns x rather than an
integer in 1:x (which is what sample does).
bsample(x, size, replace = FALSE, prob = NULL)
| x | Either a vector of one or more elements from which to choose, or a positive integer. See sample for details. | 
| size | a positive number, the number of items to choose from. | 
| replace | Should sampling be with replacement? | 
| prob | A vector of probability weights for obtaining the elements of the vector being sampled. | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.