getFName: Filepath(s) with correct extension(s)

View source: R/global.R

getFNameR Documentation

Filepath(s) with correct extension(s)

Description

Returns the filepaths with the correct extension and check for upper and lower case extension (e.g., ".txt" or ".TXT")

Usage

getFName(fPath, ext = c(".hd", ".dt1"), throwError = TRUE)

Arguments

fPath

length-one character vector (e.g., "xline01.dt1")

ext

character vector of the extension required

throwError

boolean. If TRUE, an error is thrown if the filepath with one of the extension does not exist. If FALSE, it returns NULL for the missing extension

Value

A list whose keys correspond to ext and the values to the filepaths: $hd -> xline01.hd $dt1 -> xline01.dt1


emanuelhuber/RGPR documentation built on May 13, 2024, 9:31 p.m.