This function downloads the FAERS data for selected years and quarters.
faers_download(years, quarters, format = NULL, dir = getwd(), ...)An atomic integer indicates years for which data are required.
An atomic character, only "q1", "q2", "q3", and "q4" are allowed.
File format to used, only "ascii" and "xml" are availabe. Default: "ascii".
The destination directory for any downloads. Defaults to current working dir.
Extra handle options passed to each request multi_download.
An atomic character for the path of downloaded files.
# you must change `dir`, as the file included in the package is sampled
# in this way, the file will downloaded from FAERS
faers_download(
year = 2004, quarter = "q1",
dir = system.file("extdata", package = "faers")
)
#> Finding 1 file already downloaded: aers_ascii_2004q1.zip
#> [1] "/home/wzy/R/x86_64-pc-linux-gnu-library/4.5/faers/extdata/aers_ascii_2004q1.zip"