%fcache_df% | R Documentation |
cache_df that force recreating the cached file
call %fcache_df% fname
call |
function call |
fname |
filename |
temp_file <- tempfile(fileext = ".tsv")
calc_mtcars_cyl <- function(cyl) {
message("calculating")
as.data.frame(mtcars[mtcars$cyl == cyl, ])
}
# Call "calc_mtcars_cyl" function
res1 <- calc_mtcars_cyl(6) %cache_df% temp_file
# Force re-calling the function
res2 <- calc_mtcars_cyl(6) %fcache_df% temp_file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.