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