Reads a dictionary (a list of "key = value"-pairs) from a text file.
readDictionary(file, sorted = TRUE)
file | full path to dictionary file |
---|---|
sorted | if TRUE (default) the entries in the dictionary will be sorted by their keys |
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"#> [1] "/root/example_project/out/example_file.pdf"