get_liberia_data: Function to get Liberia Coverage Survey datasets and forms...

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_liberia_data(
  id,
  username,
  password,
  start = Sys.Date(),
  end = Sys.Date(),
  filename,
  rep = FALSE,
  rep.name = NULL
)

Arguments

id

Form ID. Can be one of two form IDs used by the different forms designed for the Liberia Coverage Survey - 'liberiaCoverageRound2' and 'liberiaVillageFormRound2'.

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_liberia_data(id = "liberiaCoverageRound2",
                   username = "cadnihead",
                   password = "kEv-hAB-Arb-6Cn",
                   filename = "surveyData")

## End(Not run)

validmeasures/liberiaData documentation built on Dec. 2, 2020, 3:32 a.m.