get_file_path: Get a file path relative to the root directory

Description Usage Arguments Value Author(s) Examples

View source: R/package_functions.R

Description

Returns the relative file path to the file to the root directory. It searches in the package environment variable cabinet for the path.

Usage

1
2
get_file_path(file, inFolder = NULL, recall = T, allowMult = F,
  full = F)

Arguments

file

A character string giving the name of the file to get the full folder path for (i.e. "main.R").

inFolder

An identifer to narrow the search in case there are multiple files with same name but in different folders (i.e. "Codes/Model1").

recall

A boolean (T, F) indicator specifying whether to rebuild the cabinet if the file was not found the first time. The default is T.

allowMult

A boolean (T, F) indicator specifying whether to allow multiple file paths upon return. The default is F.

full

A boolean (T, F) indicator specifying whether to return a relative or full file path. Default is F.

Value

A character string giving the file path of the specified file to the root directory.

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

1
2
get_file_path("Model1.R")
get_file_path("Model.R", inFolder = "Codes")

opendoor-labs/projectmap documentation built on Oct. 8, 2019, 1:58 p.m.