Returns an absolute file or folder path. Folder paths can be extracted from a pre-specified environmental variable.

path_to_file(file_name = NULL, env_var = NULL, path = NULL, latest = TRUE)

Arguments

file_name

A character string, a partial match to the file of interest.

env_var

A character string, the name for the environment variable.

path

A character string, a relative or absolute path to a folder.

latest

Logical; if TRUE returns only the latest version of a file whose name contains a date.

Value

A character string.