Description Usage Arguments Value Examples
The sampling for the items of the created variable is done with replacement.
1 | new_variable(elements, n)
|
elements |
A vector with the elements from which to choose to create the variable. |
n |
An integer indicating the number of items to be contained in the variable. |
A factor that represents a uniform categorical variable.
1 2 | new_variable(c(0,1), 4)
new_variable(c('a','b','c'), 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.