Skip to contents

Path to File in Installed Package

Usage

extdataFile(..., must_exist = TRUE, dbg = FALSE)

Arguments

...

parts of the file path to be passed to system.file

must_exist

if TRUE (the default) and the specified file does not exist, the program stops with an error message

dbg

if TRUE (the default is FALSE) debug messages are shown

Value

path to file in the package installation folder in the R library or "" if the path does not exist

path to the specified file

Examples

# List the files provided in the "extdata" folder of kwb.utils
dir(extdataFile())
#> [1] "dictionary.txt"     "example-1.csv"      "provide-data.R"    
#> [4] "reorganise-tests.R"