Function throws an error when a directory does not exist.
Alternatively you can use the create parameter to create directory if it
does not exist.
Usage
check_dir(x, create = FALSE)
Arguments
- x
Character. Path name.
- create
Logical. Default FALSE. If TRUE and the path does not
exist, it will be created.
Value
Function throws an error if the path does not exist and the argument
create = FALSE. Otherwise it returns invisible NULL.
Examples
if (FALSE) { # \dontrun{
check_dir("testing")
check_dir("testing/testing_moar")
} # }