select_file: Select a file from a directory

View source: R/files.R

select_fileR Documentation

Select a file from a directory

Description

Selects a file from a vector of file names based on a regex pattern

Usage

select_file(path.list, pattern, type = c("R", "csv"))

Arguments

path.list

A character vector of paths

pattern

A regular expression

type

The file format. The functions only support .R and CSV files, with R scripts being the default format.

Value

If successful, the path of the selected file.


BroVic/jGBV documentation built on Oct. 9, 2022, 6:38 a.m.