create_dirs <- function(...){
# Creates specified folders. Requires a vector of character strings.
# Is able to create nested folders - for this, the outer folder must be parsed before the inner ones.
inputs = unlist(list(...))
# sanity checks
if(length(inputs) < 1) stop('Parse at least 1 argument to create_dirs.')
if(!is.character(inputs)) stop('Please parse characters to create_dirs.')
# create folders
for (iInput in 1:length(inputs)){
if (dir.exists(inputs[iInput]) == F){
dir.create(inputs[iInput], showWarnings = T)
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.