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