get_mcct_data: Function to get Myanmar MCCT study datasets and forms from...

Description Usage Arguments Value Examples

View source: R/01-get_data.R

Description

This function is a wrapper for a set of functions from the odkr package.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_mcct_data(
  id,
  username,
  password,
  start = Sys.Date(),
  end = Sys.Date(),
  filename,
  rep = FALSE,
  rep.name = NULL
)

Arguments

id

Form ID. Can be one of several form IDs used by the different forms designed for the MCCT study - baseline_mcct_final, baseline_mcct_anthro_final, baseline_townshipprofile_final, baseline_villprofile_final, MCCT_Baseline_Spotcheck.

username

ONA server username credentials. For

password

ONA server password credentials.

start

Include data from submission dates after (inclusive) this start date in export to CSV. Date format <yyyy/MM/dd> and default is current system date

end

Include data from submission dates before (exclusive) this date in export to CSV. Date format is <yyyy/MM/dd> and default value current system date

filename

Filename to use for data without the CSV file extension.

rep

Logical. Does the form have repeat/s? Default FALSE.

rep.name

A vector of repeat names to read in the form. Default is NULL. Must be specified if rep is TRUE.

Value

A data.frame corresponding to dataset corresponding to the form ID specified.

Examples

1
2
3
4
5
6
7
## Not run: 
  get_mcct_data(id = "baseline_mcct_final",
                username = "validmeasures",
                password = "6Y2-8yK-Nmk-Lbf",
                filename = "main_form")

## End(Not run)

validmeasures/myanmarMCCTdata documentation built on March 29, 2020, 10:27 p.m.