Learn R Programming

birp (version 0.0.5)

.checkFile.birp: Function to check if a file exists and generate error message if it was not found

Description

Function to check if a file exists and generate error message if it was not found

Usage

.checkFile.birp(
  path,
  files,
  patterns,
  allowMultiMatch = FALSE,
  sep = "\t",
  mustExist = TRUE
)

Value

A string denoting the filename(s)

Arguments

path

A file path

files

A vector of character strings corresponding to file names found in the path

patterns

A vector of patterns to search for within 'files'

allowMultiMatch

Logical. If TRUE, multiple matches are allowed

sep

The field separator character of the input file

mustExist

Logical. If TRUE, an exception is raised if the file does not exist