Wraps the file path argument of any save call. Registers the path under the current script's trail entry and returns the path unchanged, so it can be dropped inline into any save function.
Details
Requires tinytrail() to have been called first in the same session.
See also
tinytrail() to initialise the trail, tinytrail_dict() to
capture a data dictionary.
Examples
# \donttest{
withr::with_tempdir({
writeLines("Package: testproject\nVersion: 0.1.0", "DESCRIPTION")
tinytrail("Process raw data", name = "analysis.R", record_runtime = FALSE,
auto = FALSE)
write.csv(mtcars, tinytrail_write("clean.csv"))
saveRDS(lm(mpg ~ wt, mtcars), tinytrail_write("model.rds"))
})
# }