resample_uniform | R Documentation |
Draws a random (sub)sample (with or without replacement).
resample_uniform(object, ...)
## S4 method for signature 'numeric'
resample_uniform(object, n, size = length(object), replace = FALSE, ...)
object |
A |
... |
Currently not used. |
n |
A non-negative |
size |
A non-negative |
replace |
A |
A numeric
matrix
with n
rows and size
columns.
N. Frerebeau
Other resampling methods:
bootstrap()
,
jackknife()
,
resample_multinomial()
## Uniform distribution
x <- rnorm(20)
resample_uniform(x, n = 10)
## Multinomial distribution
x <- sample(1:100, 20, TRUE)
resample_multinomial(x, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.