Learn R Programming

contactsurveys (version 0.1.0)

list_surveys: List all surveys available for download

Description

List all surveys available for download

Usage

list_surveys(
  directory = tempdir(),
  overwrite = FALSE,
  verbose = TRUE,
  rate = purrr::rate_backoff(pause_base = 5, max_times = 4)
)

Value

data.table with columns: date_added, title, creator, url

Arguments

directory

Directory to save the cached survey list. Defaults to tempdir(), so the cached list does not persist across R sessions. For persistent caching, pass contactsurveys_dir().

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.

Examples

Run this code
# \donttest{
list_surveys()
# }

Run the code above in your browser using DataLab