Skip to contents

Create Function to Compose Path in Package

Usage

createFunctionExtdataFile(package)

Arguments

package

name of package for which to create a shortcut to system.file("extdata", ..., package = package)

Value

This function returns a function that internally calls

system.file("extdata", ..., package = package)

Examples

extdataFile <- createFunctionExtdataFile("kwb.utils")
dir(extdataFile())
#> [1] "dictionary.txt"     "example-1.csv"      "provide-data.R"    
#> [4] "reorganise-tests.R"