powered by
Simple random sampling
sampling( dataset, vars, sample_size, seed = 1234, data_filter = "", na.rm = FALSE, envir = parent.frame() )
Dataset to sample from
The variables to sample
Number of units to select
Random seed to use as the starting point
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")
Remove rows with missing values (FALSE or TRUE)
Environment to extract data from
A list of class 'sampling' with all variables defined in the sampling function
See https://radiant-rstats.github.io/docs/design/sampling.html for an example in Radiant
summary.sampling to summarize results
summary.sampling
# NOT RUN { sampling(rndnames, "Names", 10) # }
Run the code above in your browser using DataLab