export_data | R Documentation |
Export data in CSV format from local ODK Briefcase Storage directory to a specified destination directory and a specified file name
export_data(
target = "",
briefcase = "odkBriefcase_latest",
sd = FALSE,
id = "",
from = "",
to = "",
filename = paste(id, "_data.csv", sep = ""),
start = NULL,
end = NULL,
overwrite = FALSE,
exclude = TRUE,
group.names = TRUE,
split = FALSE,
pem = NULL,
pullBefore = FALSE,
includeGeo = FALSE
)
target |
Path to directory of ODK Briefcase |
briefcase |
Filename of the downloaded ODK Briefcase |
sd |
Logical. If TRUE, create an ODK Briefcase Storage in the path
specified by |
id |
Form ID of form to be pulled |
from |
Path to source ODK Briefcase Storage from which to extract data.
This should match directory path specified when making a call to
|
to |
Destination directory to save output data file |
filename |
Filename of output CSV data; default is
|
start |
Include data from submission dates after (inclusive) this start date in export to CSV. Date format YYYY-MM-DD or YYYY/MM/DD |
end |
Include data from submission dates before (inclusive) this date in export to CSV. Date format YYYY-MM-DD> or YYYY/MM/DD |
overwrite |
Overwrite existing output data in destination directory with the same filename; default is FALSE |
exclude |
Exclude media files on export; default is TRUE |
group.names |
Logical. Should group names be removed from column names on export? Default TRUE. |
split |
Logical. Should select multiple fields be split on export? Default FALSE. |
pem |
Path to pem key if using an encrypted form. Null by default. |
pullBefore |
Logical. If set to true, pull before export. Default FALSE. |
includeGeo |
Logical. If set to true, pull geojson. Default FALSE. |
CSV file in destination directory containing data from the pulled forms
# Export data from a specified ODK Briefcase Storage directory to current
# working directory with a filename called "test.csv"
## Not run:
dirPath <- tempdir()
get_briefcase(destination = dirPath)
export_data(target = dirPath,
from = dirPath,
to = dirPath,
id = "stakeholders",
filename = "test.csv",
overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.