save_cache: Save R Objects in Cache

View source: R/cache.R

save_cacheR Documentation

Save R Objects in Cache

Description

Save R Objects in Cache

Usage

save_cache(dir = NULL, overwrite = TRUE, obj, na = NULL)

Arguments

dir

The directory path to save the cached data. Default is NULL and the cached data is stored in ~/.cache/shm.

overwrite

Logical, TRUE or FALSE. Default is TRUE and data in the cache with the same name of the object in ... will be overwritten.

obj, na

A single R object ('obj') to be cached into the file named 'na'.

Value

The directory path of the cache.

Author(s)

Jianhai Zhang jzhan067@ucr.edu
Dr. Thomas Girke thomas.girke@ucr.edu

References

Lori Shepherd and Martin Morgan (2020). BiocFileCache: Manage Files Across Sessions. R package version 1.12.1.

Examples

# Save the object "iris" in the default cache "~/.cache/shm".
cache.pa <- save_cache(dir=NULL, overwrite=TRUE, iris)

jianhaizhang/spatialHeatmap documentation built on Feb. 19, 2024, 11:22 a.m.