sampling | R Documentation |
Simple random sampling
sampling(
dataset,
vars,
sample_size,
seed = 1234,
data_filter = "",
arr = "",
rows = NULL,
na.rm = FALSE,
envir = parent.frame()
)
dataset |
Dataset to sample from |
vars |
The variables to sample |
sample_size |
Number of units to select |
seed |
Random seed to use as the starting point |
data_filter |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |
arr |
Expression to arrange (sort) the data on (e.g., "color, desc(price)") |
rows |
Rows to select from the specified dataset |
na.rm |
Remove rows with missing values (FALSE or TRUE) |
envir |
Environment to extract data from |
See https://radiant-rstats.github.io/docs/design/sampling.html for an example in Radiant
A list of class 'sampling' with all variables defined in the sampling function
summary.sampling
to summarize results
sampling(rndnames, "Names", 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.