readDictionary: Read Dictionary from Text File

View source: R/dictionary.R

readDictionaryR Documentation

Read Dictionary from Text File

Description

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

Usage

readDictionary(file, sorted = TRUE, fileEncoding = "", ...)

Arguments

file

full path to dictionary file or connection as e.g. opened with file

sorted

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

fileEncoding

passed to readLinesWithEncoding

...

further arguments passed to readLinesWithEncoding

See Also

readDictionaries

Examples

file <- system.file("extdata", "dictionary.txt", package = "kwb.utils")

dictionary <- readDictionary(file)

resolve("file.out", dictionary, extension = "csv")
resolve("file.out", dictionary, extension = "pdf")


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.