sum_vals: Sum the values of a variable across records constituting a...

View source: R/attributes.R

sum_valsR Documentation

Sum the values of a variable across records constituting a household observation

Description

Sum the values of a variable across records constituting a household observation

Usage

sum_vals(df, var, attrib_name, attrib_vars)

Arguments

df

Data frame. Household-level microdata that contains the attribute to extract.

var

Bare name. Variable to sum.

attrib_name

Character. Name to give the attribute in the issues data file

attrib_vars

Character. Regular expression that identifies the variable in var.

Value

Data frame of attributes with the following columns:

  • interview__id

  • interview__key

  • attrib_name

  • attrib_val

  • attrib_vars


arthur-shaw/susoreview documentation built on Feb. 10, 2023, 7:54 p.m.