pullForm: pullForm

Description Usage Arguments Note Author(s) Examples

View source: R/pullForm.R

Description

This function pulls forms from an odk server using ODK Briefcase. It's likely useful to set some of the parameters in variables, as they will be necessary to export the forms.

Usage

1
2
3
4
5
6
7
8
9
pullForm(
  url = NULL,
  userid = NULL,
  passwd = NULL,
  formid = NULL,
  storage = getwd(),
  central = FALSE,
  project_id = NULL
)

Arguments

url

The URL to the ODK Aggregate server. This may be something like 'https://kc.humanitarianresponse.info/<USERID>/'. Be sure to include your userid here if the server requires it.

userid

The user id for your odk aggregate server account. This must have permission to view submissions.

passwd

The Password for your account. Be careful about keeping this in your R code. Best practice is likely to put this in your .Renviron file.

formid

The unique formid string for your server.

storage

Optional parameter, and defaults to your current working directory.

central

Specify as TRUE if pulling from an ODK Central server. It is FALSE by default, which means that the command will assume an aggregate type server.

project_id

When pulling from a central server, it is essential to specify a project_id.

Note

This function will check for and download ODK Briefcase. Make sure your firewalls allow for this the first time you run an odk function.

Author(s)

J.W. Rozelle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Set parameters
odkUserID <- "<USERNAME_GOES_HERE>"
odkURL <- paste0("https://kc.humanitarianresponse.info/", odkUserID, "/")
odkPW <- "<SECRET_PASSWORD>"
odkFormid <- "my_odk_form_id"
odkStorage <- paste0(my_directory, "/", "ODK")


# Run command
pullForm(odkURL, odkUserID, odkPW, odkFormid, odkStorage)

jwilliamrozelle/figured documentation built on June 10, 2021, 5:32 p.m.