You can use showWarnings = FALSE
NOTE: showWarnings = FALSE, hides warnings such as the directory being uncreateable.
dir.create(file.path(Main_Directory, Sub_Directory), showWarnings = FALSE)
setwd(file.path(Main_Directory, Sub_Directory))
NOTE: dir.create() does not crash if the directory exists, but it just prints out a warning.
dir.create(file.path(Main_Directory, Sub_Directory))
setwd(file.path(Main_Directory, Sub_Directory))