# Use a temporary library so the example cannot affect installed packages.
example_lib <- tempfile("factoextra-lock-example-")
example_lock <- file.path(example_lib, "00LOCK-factoextra")
dir.create(example_lock, recursive = TRUE)
clean_locks <- getFromNamespace("clean_lock_files", "factoextra")
clean_locks(lib = example_lib, ask = FALSE)
stopifnot(!dir.exists(example_lock))
unlink(example_lib, recursive = TRUE)
Run the code above in your browser using DataLab