Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache requests #132

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add note about caching/downloading
  • Loading branch information
sbfnk committed Sep 18, 2024
commit be2cc5df08f49f7d4c65657b273c5e7c79a736fd
5 changes: 4 additions & 1 deletion R/get_survey.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#' Get a survey, either from its Zenodo repository, a set of files, or a survey variable
#
#'
#' @description Downloads survey data, or extracts them from files, and returns a clean data set.
#' 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()].
#' @param 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
#' @importFrom memoise memoise
#' @inheritParams .get_survey
Expand Down
Loading