Learn R Programming

DCC (version 1.2.1)

dcc_read_config: Read an Excel cleaning-plan configuration

Description

Converts an Excel cleaning-plan workbook into a dcc_config, so survey staff specify the record ID, item columns, rules, and dispositions in a spreadsheet rather than writing YAML.

Usage

dcc_read_config(path)

Value

A dcc_config.

Arguments

path

Path to the .xlsx cleaning-plan workbook.

Details

The workbook has two sheets. settings has key/value rows (id_var, optional items as a comma-separated list). rules has one row per check with columns id, type, variable, min, max, values, items, max_prop, max_run, time_var, min_seconds, traps, severity, action, and recode_map. Write a starter workbook with dcc_write_config_template.

See Also

dcc_write_config_template, dcc_config, dcc_run.

Examples

Run this code
if (requireNamespace("writexl", quietly = TRUE) &&
    requireNamespace("readxl", quietly = TRUE)) {
  path <- tempfile(fileext = ".xlsx")
  dcc_write_config_template(path)
  dcc_read_config(path)
}

Run the code above in your browser using DataLab