wrangle_microdata: Prepare Microdata For Reporting

Description Usage Arguments Value

View source: R/wrangle.R

Description

Merge microdata with hierarchy information and filter by a provided vector of unit codes.

Usage

1
wrangle_microdata(microdata, hierarchy, metadata, unit_codes)

Arguments

microdata

A data.frame. Your organisation's microdata file that contains the responses of each respondent. Received as the file csps2019_flat.csv.

hierarchy

A data.frame. The lookup file that matches each respondent to their unit code. Received in the file csps2019_hierarchy.csv.

metadata

A data.frame. The file that provides additional metadata about each unit, such as headcount and name. Received in the file csps2019_hierarchy_metadata.csv.

unit_codes

A character vector of organisational unit codes in the form "XX0000".

Value

A data.frame.


co-analysis/cspsreports documentation built on Aug. 28, 2020, 12:04 a.m.