# Create a simple example:
path <- orderly_example()
# We simulate running a packet interactively by using 'source';
# you might have run this line-by-line, or with the "Source"
# button in Rstudio.
source(file.path(path, "src/data/data.R"), chdir = TRUE)
# Having run this, the output of the report is present in the
# source directory:
fs::dir_tree(path)
# We can detect what might want cleaning up by running
# "orderly_cleanup_status":
orderly_cleanup_status("data", root = path)
# Soon this will print more nicely to the screen, but for now you
# can see that the status of "data.rds" is "derived", which means
# that orderly knows that it is subject to being cleaned up; the
# "delete" element shows what will be deleted.
# Do the actual deletion:
orderly_cleanup("data", root = path)
Run the code above in your browser using DataLab