Learn R Programming

ribiosUtils (version 1.5-6)

isDir: Checks existing directory

Description

Checks whether given character strings point to valid directories

Usage

isDir(...)

checkDir(...)

assertDir(...)

Arguments

One or more character strings giving directory names to be tested

Value

isDir returns logical vector.

assertDir returns an invisible TRUE if directories exist, otherwise halts and prints error messages.

Details

isDir tests whether the given string represent a valid, existing directory. assertDir performs a logical test, and stops the program if the given string does not point to a given directory.

checkDir is synonymous to isDir

See Also

file.info, checkFile and assertFile

Examples

Run this code
# NOT RUN {
dir1 <- tempdir()
dir2 <- tempdir()

isDir(dir1, dir2)
assertDir(dir1, dir2)

# }

Run the code above in your browser using DataLab