Just to make sure we don't need to download the data each and every time.
One approach is to consider memoisation to manage the downloads of files so we don't download each time
Another approach to this could be to save it in the pkg user directory:
get_pkg_user_dir <- function() {
pkg_user_dir <- tools::R_user_dir("ozroaddeaths")
if (!dir.exists(pkg_user_dir)) {
dir.create(pkg_user_dir, recursive = TRUE)
}
pkg_user_dir
}
and then do some sort of cache invalidation magic to check if the data needs to be updated
Just to make sure we don't need to download the data each and every time.
One approach is to consider memoisation to manage the downloads of files so we don't download each time
Another approach to this could be to save it in the pkg user directory:
and then do some sort of cache invalidation magic to check if the data needs to be updated