Learn R Programming

drake (version 4.2.0)

clean: Function clean

Description

Cleans up all work done by make().

Usage

clean(..., list = character(0), destroy = FALSE, path = getwd(),
  search = TRUE, cache = NULL)

Arguments

...

targets to remove from the cache, as names (unquoted) or character strings (quoted). Similar to ... in remove(...).

list

character vector naming targets to be removed from the cache. Similar to the list argument of remove().

destroy

logical, whether to totally remove the drake cache. If destroy is FALSE, only the targets from make() are removed. If TRUE, the whole cache is removed, including session metadata, etc.

path

Root directory of the drake project, or if search is TRUE, either the project root or a subdirectory of the project.

search

logical. If TRUE, search parent directories to find the nearest drake cache. Otherwise, look in the current working directory only.

cache

optional drake cache. See codenew_cache(). If If cache is supplied, the path and search arguments are ignored.

Details

You must be in your project's working directory or a subdirectory of it. clean(search = TRUE) searches upwards in your folder structure for the drake cache and acts on the first one it sees. Use search == FALSE to look within the current working directory only. WARNING: This deletes ALL work done with make(), which includes file targets as well as the entire drake cache. Only use clean() if you're sure you won't lose anything important.

See Also

prune, make,

Examples

Run this code
# NOT RUN {
load_basic_example()
make(my_plan)
cached(no_imported_objects = TRUE)
clean(summ_regression1_large, small)
cached(no_imported_objects = TRUE)
make(my_plan)
clean()
clean(destroy = TRUE)
# }

Run the code above in your browser using DataLab