Used in several functions before saving output. Ensures that the code doesn't fail by making sure the directory exists.

dir.check.add(Dir.main = getwd(), Dir.sub)

Arguments

Dir.main

Main/root directory; default is getwd()

Dir.sub

sub directory to check for and add if necessary.

Value

Nothing to return

Examples

Dir.main <- getwd() Dir.sub <- "output" dir.check.add(Dir.main, Dir.sub)