dir <- tempdir()
set_sourcoise_root(dir)
fs::file_copy(
fs::path_package("sourcoise", "some_data.R"),
dir,
overwrite = TRUE)
# Force execution (root is set explicitly here, it is normally deduced from project)
data <- sourcoise("some_data.R", force_exec = TRUE)
# Access metadata without loading the cached data
meta <- sourcoise_meta("some_data.R")
print(meta$timing) # View execution time
print(meta$ok) # Check cache status
Run the code above in your browser using DataLab