Learn R Programming

ribiosUtils (version 1.7.7)

checkFile: Check whether file(s) exist

Description

checkFile checks whether file exists, assertFile stops the program if files do not exist

Usage

checkFile(...)

assertFile(...)

Value

checkFile returns logical vector. assertFile returns an invisible TRUE if files exist, otherwise halts and prints error messages.

Arguments

...

Files to be checked

Author

Jitao David Zhang <jitao_david.zhang@roche.com>

Details

assertFile is often used in scripts where missing a file would cause the script fail.

See Also

isDir and assertDir

Examples

Run this code

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