preProcTxt {inpdfr} | R Documentation |
Extract text from txt files and pre-process content.
Description
Extract text from txt files and pre-process content.
Usage
preProcTxt(filetxt, encodingIn = "UTF-8", encodingOut = "UTF-8")
Arguments
filetxt |
A character containing the name of a txt file. |
encodingIn |
Encoding of the text file (default = "UTF-8"). |
encodingOut |
Encoding of the text extracted (default = "UTF-8"). |
Value
A character vector with the content of the pre-process txt file (one element per line).
Examples
## Not run:
data("loremIpsum")
subDir <- "RESULTS"
dir.create(file.path(getwd(), subDir), showWarnings = FALSE)
write(x = loremIpsum, file = "RESULTS/loremIpsum.txt")
preProcTxt(filetxt = paste0(getwd(), "/RESULTS/loremIpsum.txt"))
file.remove(list.files(full.names = TRUE,
path = paste0(getwd(), "/RESULTS"), pattern = "loremIpsum"))
## End(Not run)
[Package inpdfr version 0.1.12 Index]