Description Usage Arguments Details See Also Examples
The path for a cached object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | cached_path(x)
## S3 method for class 'cached_path'
print(x, ...)
as_cached_path(x, cache = cache_path(), ext = cache_ext())
## Default S3 method:
as_cached_path(x, cache = cache_path(), ext = NULL)
## S3 method for class 'character'
as_cached_path(x, cache = cache_path(), ext = backends_exts())
## S3 method for class 'cached_file'
as_cached_path(x, cache = cache_path(), ext = NULL)
## S3 method for class 'cached_name'
as_cached_path(x, cache = cache_path(), ext = cache_ext())
|
x |
string or |
... |
additional arguments |
cache |
string; location of the cache directory. (Default: |
ext |
string; extension for the file. (Default: |
A cached_path
is a fs::path()
object that points to an object in the
cache, It is not the cache directory itself. Use cache_path()
for getting
and setting the location of the cache directory.
cache_path()
fs::path()
1 2 3 4 5 6 7 | cached_path("cache/iris.rds")
cached_path( c("cache/iris.rds", "mtcars.rds") )
as_cached_path(iris)
cached_file('iris.rds') %>% as_cached_path()
cached_name('iris') %>% as_cached_path()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.