extract: extract

Description Usage Arguments Details Value Examples

View source: R/rake_functions.R

Description

Extract aggregate weights from individual weight table

Usage

1
extract(weights, inds, id)

Arguments

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

Details

Extract aggregate weights from individual weight table, typically produced by rakeR::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, use integerise() instead.

Value

A data frame with zones and aggregated simulated values for each variable

Examples

1
2
3
## Not run
## Use weights object from weights()
## ext_weights <- extract(weights = weights, inds = inds, id = "id")

Example output

Attaching package: 'rakeR'

The following object is masked from 'package:stats':

    simulate

rakeR documentation built on May 2, 2019, 5:13 a.m.