Learn R Programming

birp (version 0.0.5)

.openFile.birp: Function to open a file and generate error message if it was not found

Description

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

Usage

.openFile.birp(
  path,
  files,
  patterns,
  sep = "\t",
  header = TRUE,
  mustExist = TRUE
)

Value

A file connection.

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'.

sep

The field separator character of the input file

mustExist

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