R make directory code example Example: r make directory dir.create(file.path(mainDir, subDir), showWarnings = FALSE)