enum_get: Return or open an enumerator document

Description Usage Arguments Note Author(s) Examples

View source: R/enum_get.R

Description

Returns the text of an enumerator document as a character vector indexed numerically by XML "textID" tags or, if specified, opens the file in Word (or system default program).

Usage

1
enum_get(sample, female_q = F, mnh_wave, open = F, path, name_tag = F)

Arguments

sample

A PMA sample

female_q

Logical: defaults FALSE. If TRUE, function gets the file associated with a sample's female questionnaire, rather than its household questionnaire.

mnh_wave

Optional: one of f, f1, f2, f3, or hh.

open

Logical: defaults FALSE. If true, the file will be opened in Word (or system default program), and not returned.

path

Optional: The full path to the desired file may be provided as an alternative to the other arguments

name_tag

Logical: defaults FALSE. If TRUE, function returns only the name of the enum file with "_tag" appended (for use in data dictionary tagging)

Note

The function enum_make is to be used for creating new enum documents from ODK files.

Author(s)

Matt Gunther

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 

# Default: Opens household questionnaire
enum_get("in2016a_hh") 

# Opens female questionnaire
enum_get("in2016a_hh", female_q = T) 

# Default: Opens SDP questionnaire
enum_get("in2016a_sp") 

# Default: Opens hh nutrition questionnaire
enum_get("bf2018a_nh") 

# Opens female nutrition questionnaire
enum_get("bf2018a_nh", female_q = T) 

# Opens MNH wave 1 
enum_get("et2016a_mn", mnh_wave = "f1") 

# Opens MNH female screening questionnaire
enum_get("et2016a_mn", mnh_wave = "f") 


## End(Not run)

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