rk_extract.Rd
Extract aggregate weights from individual weight table
rk_extract(weights, inds, id)
weights | A weight table, typically produced by rakeR::weight() |
---|---|
inds | The individual level data |
id | The unique id variable in the individual level data (inds), usually the first column |
A data frame with zones and aggregated simulated values for each variable
Extract aggregate weights from individual weight table, typically produced by rakeR::rk_weight()
Extract cannot operate with numeric variables because it creates a new variable for each unique factor of each variable If you want numeric information, like income, you need to cut() the numeric values, or use integerise() instead.
## Not run ## Use weights object from rk_weight() ## ext_weights <- rk_extract(weights = weights, inds = inds, id = "id")