Reads a dictionary (a list of "key = value"-pairs) from a text file.

readDictionary(file, sorted = TRUE)

Arguments

file

full path to dictionary file

sorted

if TRUE (default) the entries in the dictionary will be sorted by their keys

See also

Examples

file <- system.file("extdata", "dictionary.txt", package = "kwb.utils") dictionary <- readDictionary(file) resolve("file.out", dictionary, extension = "csv")
#> [1] "/root/example_project/out/example_file.csv"
resolve("file.out", dictionary, extension = "pdf")
#> [1] "/root/example_project/out/example_file.pdf"