odk_get: Return or open ODK files from PMA admin folder

Description Usage Arguments Author(s) Examples

View source: R/odk_get.R

Description

Loads the sheets "survey" and "choices" as a list of tibbles or, if specified, opens the ODK file in Excel.

Usage

1
odk_get(sample, survey, open = F)

Arguments

sample

A sample found in the ODK file inventory. Note that the sample name needs only to match the ODK file inventory; it does not have to exist in Samples.xlsx.

survey

By default, odk_get reads the household survey ODK file for person-level data. Other survey forms can be specified if they are currently column names in the ODK file inventory (e.g. "female", see example).

open

Logical: defaults FALSE. If TRUE, the ODK file will be opened in Excel and not returned.

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
## Not run: 

# Default: loads household survey as tibble 
odk_get("ke2015a_hh") 

# Default: loads sdp survey as tibble 
odk_get("ke2015a_sp") 

# Loads female survey
odk_get("ke2015a_hh", survey = "female") 

# Loads MNH wave 1 survey
odk_get("et2016a_mn", survey = "r1") 

# Opens ODK file in Excel
odk_get("ke2015a_hh", open=T) 

# Load ODK file, then access individual
odk <- odk_get("ke2015a_hh")
odk$survey
odk$choices


## End(Not run)

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