universe | R Documentation |
Along with the data to be weighted, this combines one or more objects of
class category
to build the universe with known marginal proportions.
It also checks and adjusts the proportions to account for missing values in the data.
universe(data, ...)
data |
Data frame containing data where weights are desired. |
... |
One or more output objects from |
A list
with special class universe
.
universe(
data = mtcars,
category(
name = "cyl",
groups = c(4, 6, 8),
targets = c(0.3, 0.3, 0.4)
),
category(
name = "vs",
groups = c(0, 1),
targets = c(1/2, 1/2)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.