Description Usage Arguments Details
View source: R/ref_quest_split.R
sample_safe
takes a sample of the specified size from the elements of x
using either with or without replacement.
1 | sample_safe(x, size, replace = FALSE)
|
x |
a vector of one or more elements from which to choose |
size |
a non-negative integer giving the number of items to choose. |
replace |
should sampling be with replacement? |
Works like base::sample()
, but it is safer if x
is a scalar.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.