NRBTD_download: Download data from an entire study

Description Usage Arguments Note See Also Examples

Description

Use this function to download all of the data from a single study. Locate the study using the search page (https://tsapps.nist.gov/NRBTD/Studies/Studies).

Usage

1
2
NRBTD_download(study_link, directory, mirrorFileStructure = T,
  maxFiles = 0, quiet = T)

Arguments

study_link

Link to study page, or id value (https://tsapps.nist.gov/NRBTD/Studies/Studies/Details/<study-id-value>)

directory

Directory to download the data into.

mirrorFileStructure

Should separate folders be created for each firearm and bullet? This may result in highly nested data structure. Setting this to FALSE may result in metadata being overwritten.

maxFiles

maximum number of x3p files to download. 0 indicates that all x3p files should be downloaded.

quiet

quiet download of files

Note

To instead download enough data to use for package exploration, use the NRBTDsample_download function.

See Also

NRBTDsample_download

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
url <- "https://tsapps.nist.gov/NRBTD/Studies/Studies/Details/"
studyID <- "c09aaa86-5d60-4acb-9031-46dad2c0ad32"
fullurl <- paste0(url, studyID)
NBTRD_download(fullurl,
                   file.path("data"), mirrorFileStructure = T)
NBTRD_download(studyID, file.path("data"), mirrorFileStructure = T)

## End(Not run)

CSAFE-ISU/nbtrd documentation built on Dec. 28, 2020, 12:41 a.m.