Description Usage Arguments Details Functions Note Author(s) Examples
The user is given an option when downloading the climcropr
data to cache or not to cache the data for later use. If
cache == TRUE
, then the climcropr data files are saved in a
directory in the users' home file space. These functions provide facilities
for interacting and managing these files.
1 2 3 4 5 6 7 |
files |
Character. One or more complete file names with no file path |
force |
Logical. Should files be force deleted? Defaults to :
|
climcropr_cache_delete
only accepts one file name, while
climcropr_cache_delete_all
does not accept any names, but deletes all files.
For deleting many specific files, use cache_delete
in a
lapply
type call.
We files cache using user_cache_dir
, find your
cache folder by executing rappdirs::user_cache_dir("climcropr")
climcropr_cache_list()
returns a character vector of full path file
names
climcropr_cache_delete()
deletes one or more files, returns nothing
climcropr_cache_delete_all()
delete all files, returns nothing
climcropr_cache_details()
prints file name and file size for each
file, supply with one or more files, or no files (and get details for
all available)
These functions were adapted from rOpenSci's cc_cache
.
Original: Scott Chamberlain, scott@ropensci.org, adapted for use in this package by Adam H Sparks, adamhsparks@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# List files in cache
climcropr_cache_list()
# List info for single files
climcropr_cache_details(files = climcropr_cache_list()[1])
climcropr_cache_details(files = climcropr_cache_list()[2])
# List info for all files
climcropr_cache_details()
# Delete files by name in cache
climcropr_cache_delete(files = climcropr_cache_list()[1])
# Delete all files in cache
climcropr_cache_delete_all()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.