View source: R/misc_functions.R
resample | R Documentation |
`x`
of the specified size. Both size and `x`
has to be integers'resample' Gives sample of from the elements of `x`
of the specified size. Both size and `x`
has to be integers
resample(x, ...)
x |
A vector to be sampled |
... |
Eventual condition for the vectorisation |
Sample(s) from the `x`
vector, according to eventual conditions provided
x <- 1:10
resample(x[x > 8]) # length 2
resample(x[x > 9]) # length 1
resample(x[x > 10]) # length 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.