grapes-fcache_rds-grapes: cache_rds that force recreating the cached file

%fcache_rds%R Documentation

cache_rds that force recreating the cached file

Description

cache_rds that force recreating the cached file

Usage

call %fcache_rds% fname

Arguments

call

function call

fname

filename

Examples

temp_file <- tempfile(fileext = "rds")
calc_mtcars_cyl <- function(cyl) {
    message("calculating")
    mtcars[mtcars$cyl == cyl, ]
}

# Call "calc_mtcars_cyl" function
res1 <- calc_mtcars_cyl(6) %cache_rds% temp_file

# Force re-calling the function
res2 <- calc_mtcars_cyl(6) %fcache_rds% temp_file

tanaylab/tgutil documentation built on March 16, 2024, 12:07 a.m.