View source: R/decorate_storr.R
drake_tempfile | R Documentation |
Create the path to a temporary file inside drake's cache.
drake_tempfile(path = NULL, cache = drake::drake_cache(path = path))
path |
Path to a |
cache |
drake cache. See |
This function is just like the tempfile()
function in base R
except that the path points to a special location inside drake
's cache.
This ensures that if the file needs to be copied to
persistent storage in the cache, drake
does not need to copy across
physical storage media. Example: the "diskframe"
format. See the
"Formats" and "Columns" sections of the drake_plan()
help file.
Unless you supply the cache or the path to the cache
(see drake_cache()
) drake
will assume the cache folder is named
.drake/
and it is located either in your working directory or an
ancestor of your working directory.
drake_cache()
, new_cache()
cache <- new_cache(tempfile())
# No need to supply a cache if a .drake/ folder exists.
drake_tempfile(cache = cache)
drake_plan(
x = target(
as.disk.frame(large_data, outdir = drake_tempfile()),
format = "diskframe"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.