powered by
Given the names of (potential) directories, create the ones that do not already exist.
CreateDirsIfNotThere(dir.names)
The name of the directories, specified via relative or absolute paths.
Invisibly, a vector with a TRUE for each time a directory was actually created and a FALSE otherwise.
TRUE
FALSE
setwd(tempdir()) CreateDirsIfNotThere(c("mydir", "yourdir")) RemoveDirs(c("mydir", "yourdir"))
Run the code above in your browser using DataLab