ghfile {mmstat4}R Documentation

ghfile

Description

Finds either a unique match in the list of files or throws an error with possible candidate files.

Usage

ghfile(x, n = 6, silent = FALSE, msg = "%s")

Arguments

x

character: a single file name

n

logical: if x can not be found how many best matches should be returned (default: 6)

silent

logical: if no (unique) match is found, then NULL is returned, otherwise an error is thrown (default: FALSE, throw error)

msg

character: error message how to put the file name(s (default: ⁠%s⁠)

Value

the full matching file

Examples

ghfile("data/BANK2.sav")
if (interactive()) ghfile("data/BANK2.SAV")  # throws an error

[Package mmstat4 version 0.2.1 Index]