Learn R Programming

reproducible (version 0.1.3)

clearStubArtifacts: Clear erroneous archivist artifacts

Description

Clear stub artifacts resulting when an archive object is being saved at the same time as another process doing the same thing.

Usage

clearStubArtifacts(repoDir = NULL)

# S4 method for ANY clearStubArtifacts(repoDir = NULL)

Arguments

repoDir

A character denoting an existing directory of the repository for which metadata will be returned. If NULL (default), it will use the repoDir specified in archivist::setLocalRepo.

Value

Invoked for its side effect on the repoDir.

Examples

Run this code
# NOT RUN {
tmpDir <- file.path(tempdir(), "reproducible_examples", "clearStubArtifacts")

lapply(c(runif, rnorm), function(f) {
  reproducible::Cache(f, 10, cacheRepo = tmpDir)
})

# clear out any stub artifacts
clearStubArtifacts(tmpDir)

# cleanup
clearCache(tmpDir)
unlink(tmpDir, recursive = TRUE)

# }

Run the code above in your browser using DataLab