View source: R/proportion_gen.R
proportion_gen | R Documentation |
Creates a list of vectors, each containing the randomly generated cumulative proportions of a discrete variable.
proportion_gen(cat_options, n_cat_options)
cat_options |
vector of response types. |
n_cat_options |
vector of number of items of the corresponding response type. |
cat_options
and n_cat_options
must be the same length.
cat_options = 1
is a continuous variable.
The result from proportion_gen
can be used directly with the cat_prop
argument of questionnaire_gen
.
proportion_gen(cat_options = c(1, 2, 3), n_cat_options = c(2, 2, 2))
proportion_gen(cat_options = c(1, 3), n_cat_options = c(4, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.