new_category | R Documentation |
This appends an existing universe
object with a new weighting category.
new_category(universe, name, groups, targets)
universe |
Output object from |
name |
The name of the weighting category matching the name of the corresponding variable in the data to be weighted. |
groups |
A vector of the groups in the weighting category. |
targets |
A vector of the desired proportions of the |
A list
with special class universe
.
uni <- universe(
data = mtcars,
category(
name = "vs",
groups = c(0, 1),
targets = c(1/2, 1/2)
)
)
new_category(
universe = uni,
name = "am",
groups = c(0, 1),
targets = c(1/3, 2/3)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.