Description Usage Arguments Value Author(s) Examples
Creates proportions (with names) of the variables you want to weight to.
1 |
vector |
Numeric vector of the proportions. Probably something like c(33,33,34). |
names |
Character vector of names. Probably something like c("Dem","Rep","Ind") |
Numeric vector of proportions with names associated with it.
Loren Collingwood <loren.collingwood@ucr.edu>
1 2 3 4 5 6 7 8 9 | #NOT RUN: CREATE WEIGHT TO PROPORTIONS
weight_props_age <- weight_to(c(26.0,39.3,34.7), c("18-40","41-65","66+"))
weight_props_age
weight_props_gender <- weight_to(c(49,51), c("Male","Female"))
weight_props_gender
weight_props_party <- weight_to(c(33.8,28.1,38.1), c("Dem","Rep","Ind"))
weight_props_party
weight_props_region <- weight_to(c(53.5,20.6,25.8), c("Reg1-PS","Reg2-EW","Reg3-O"))
weight_props_region
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.