Retrieves the data submitted to a specified dataset.

kobo_data_downloader(formid, user = NULL, api = "unhcr", check = TRUE)

Arguments

formid

The ID of the form to be accessed (as a character string).

user

Optional. A single string indicating the username and password (in the form of "username:password"), or a character vector or list, length 2, with the first value being the "username", and the second being the "password".

api

The URL at which the API can be accessed. Defaults to "unhcr", which loads the UNHCR KoBo Toolbox API.

check

Logical. Should the function first check to see whether the data is available offline.

Value

A "data.table" with the full dataset. If data is already found on disk and the number of rows matches with the online datasets, the local copy would be used. The dataset would be named in the form of "data_formid".

Author

Ananda Mahto

Examples

if (FALSE) { kobo_data_downloader("15051") kobo_data_downloader("31511", api = "unhcr") }