runonce
Run once and save result. Then, just read the result.
Code example
tmp <- tempfile(fileext = ".rds")
save_run({
Sys.sleep(2)
1
}, file = tmp)
save_run({
Sys.sleep(2)
1
}, file = tmp)GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up