powered by
checkFile checks whether file exists, assertFile stops the program if files do not exist
checkFile
assertFile
checkFile(...)assertFile(...)
assertFile(...)
checkFile returns logical vector. assertFile returns an invisible TRUE if files exist, otherwise halts and prints error messages.
TRUE
Files to be checked
Jitao David Zhang <jitao_david.zhang@roche.com>
assertFile is often used in scripts where missing a file would cause the script fail.
isDir and assertDir
isDir
assertDir
myDesc <- system.file("DESCRIPTION", package="ribiosUtils") myNEWS <- system.file("NEWS", package="ribiosUtils") checkFile(myDesc, myNEWS) assertFile(myDesc, myNEWS)
Run the code above in your browser using DataLab