find_file: Extract file path from folder

Description Usage Arguments Details Value

View source: R/utils.R

Description

find_file is a function that takes the name of a file and returns the path to the file, if found.

Usage

1
find_file(name, ext = "fst", file_num = 1)

Arguments

name

Character vector of the name of the file to look for

ext

The file extension without a period (.)

file_num

Numeric. In case more than one file matches the name argument, one can specify which of the files to return. Defaults to one.

Details

Used in scripts: Robust function: TRUE

Value

Returns the file path, if the file is not found it returns an error. If more than one file matches the name, a list of all matches is also printed to console to facilitate picking the right file_num


AndreSjuve/flowaid documentation built on Dec. 17, 2021, 8:50 a.m.