choose | R Documentation |
This function allows you to choose easily random elements of your dataset.
choose(x = NULL, n = 1, replace = FALSE)
x |
dataset (array or data frame) where to choose from |
n |
number of choices (sample size) |
replace |
sample with replacement or not. Default is FALSE. |
object
# Choose a random number between 1 and 3
choose(c(1,2,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.