Removes a sandbox directory and all its contents. This should be called after testing is complete to free up disk space.
Arguments
- sandbox
Optional. A sandbox object created by
setup_sandbox(). If NULL (default), cleans up the most recently created sandbox.- force
Logical. If TRUE (default), removes directory even if it contains files.
Examples
if (FALSE) { # \dontrun{
# Setup sandbox
sandbox <- setup_sandbox(c("data/mydata.rds", "code/analysis.R"))
# ... use sandbox ...
# Clean up
cleanup_sandbox(sandbox)
} # }