checkDirectory(x, access = "")assertDirectory(x, access = "", .var.name)
testDirectory(x, access = "", .var.name)
x
. Defaults to a heuristic to determine
the name using deparse
and substitute
.character(1)
]
Single string containing possible characters TRUE
.
If the check is not successful, assertDirectory
throws an error message,
testDirectory
returns FALSE
and checkDirectory
returns
a string with the error message.assertAccess
,
checkAccess
, testAccess
;
assertFile
, checkFile
,
testFile
;
assertPathForOutput
,
checkPathForOutput
,
testPathForOutput
# Is R's home directory readable?
testDirectory(R.home(), "r")
# Is R's home directory readable and writable?
testDirectory(R.home(), "rw")
Run the code above in your browser using DataLab