enum_make: Automatically convert ODK object to Enumerator document

Description Usage Arguments Note Author(s) Examples

View source: R/enum_make.R

Description

Converts a PMA ODK tibble (imported via the function odk_get, see example) to a .txt file enumerator documents in the same location as the ODK Excel file. This .txt file should be opened by the user, saved as a .doc file, and checked for XML errors with the appropriate IPUMs Macro for Word. It can then be moved to the storage location for PMA enumerator files.

Usage

1
enum_make(odk, write, open_on_write)

Arguments

odk

A tibble version of a PMA ODK file created by the function odk_get.

write

Logical: defaults TRUE. If FALSE, the text of the enumerator document will be returned as a list and not written.

open_on_write

Logical: defaults FALSE. If TRUE, the new enumerator document will be opened in Word (or system default).

Note

Personal information on PMA ODK files is normally filtered out by this function, provided that PMA follows conventional practice by storing personal information on the Excel sheet called "external". If this convention is broken (or if the Excel file was created before the convention was established), the user may need to manually search for and remove such information.

Author(s)

Matt Gunther

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Step 1: use odk_get to load an ODK file into R
my_odk <- odk_get("ke2015a_hh") 

# Step 2: create txt file from loaded ODK object
enum_make(my_odk)

## End(Not run)

mgunther87/ipumsPMA documentation built on Aug. 1, 2020, 12:22 a.m.