| get_survey | R Documentation |
get_survey() has been deprecated in favour of using
contactsurveys::download_survey() and then load_survey().
Downloads survey data, or extracts them from files, and returns a clean data
set. If a survey URL is accessed multiple times, the data will be cached
(unless clear_cache is set to TRUE) to avoid repeated downloads.
If survey objects are used repeatedly the downloaded files can be saved and
reloaded between sessions then survey objects can be saved/loaded using
base::saveRDS() and base::readRDS(), or via the individual survey files
that can be downloaded using download_survey() and subsequently loaded
using load_survey().
get_survey(survey, clear_cache = FALSE, ...)
survey |
a DOI or url to get the survey from, or a |
clear_cache |
logical, whether to clear the cache before downloading the survey; by default, the cache is not cleared and so multiple calls of this function to access the same survey will not result in repeated downloads. |
... |
currently unused |
a survey in the correct format
## Not run:
list_surveys()
peru_doi <- "https://doi.org/10.5281/zenodo.1095664"
peru_survey <- get_survey(peru_doi)
## --> We now recommend:
peru_survey <- contactsurveys::download_survey(peru_doi)
peru_data <- load_survey(peru_survey)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.