Description Usage Arguments Details See Also
Add a cache to a project
1 2 3 4 5 6 7 | use_cache(
path = cache_find(),
ignore = TRUE,
...,
git_ignore = ignore,
rbuild_ignore = ignore
)
|
path |
string; path to cache directory (DEFAULT:NULL) |
ignore |
logical; whether to ignore both .gitignore and rbuildignore |
... |
unused – requires that |
git_ignore |
logical; whether to put |
rbuild_ignore |
logical; whether to put |
In most cases, all you need to do is use_cache()
. This will:
create a cache directory in your git, rstudio or r package root.
add ignore to .gitignore
add ignore to .Rbuildignore
Arguments allow for fine tuning of the behaviors.
path
allows for the cache directory to be specified. If the
directory does not exist, it is created. The default is to use cache_find()
to search for a pre-existing cache. See cache_find()
for details.
git_ignore
controls whether the cache is ignored by git. The default is not
to commit the cache data to git as the cache is seen as a working directory.
rbuild_ignore
controls whether the cache is incorporated into the package
build. The default is not to include them.
Both git_ignore
and rbuild_ignore
require explicit argument names.
here::here()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.