List all surveys available for download
Usage
list_surveys(
directory = contactsurveys_dir(),
overwrite = FALSE,
verbose = TRUE,
rate = purrr::rate_backoff(pause_base = 5, max_times = 4)
)Arguments
- directory
Directory of where to save survey files. The default value is to use the directory for your system using
contactsurveys_dir(), which usestools::R_user_dir(), and appends the survey URL/DOI basename as a new directory. E.g., if you provide in thesurveyargument, "10.5281/zenodo.1095664", it will save the surveys into a directoryzenodo.1095664undercontactsurveys_dir()This effectively caches the data. You can specify your own directory, or set an environment variable,CONTACTSURVEYS_HOME, seeSys.setenv()or Renviron for more detail. If this argument is set to something other thancontactsurveys_dir(), a warning is issued to discourage unnecessary downloads outside the persistent cache. Note that identical content accessed via different identifiers (e.g., DOI vs. a resolved record URL) will be cached in separate directories by design.- overwrite
If files should be overwritten if they already exist. Default FALSE
- verbose
Whether downloads should be echoed to output. Default TRUE.
- rate
a purrr rate object, to facilitate downloading if the download fails. Defaults to an exponential backoff of 5 seconds (up to 4 attempts: 1 initial + 3 retries) changed by specifying your own rate object, see
?purrr::rate_backoff()for details.