I am trying to analyze pdf files in R. Following the instructions on data.library.virginia.edu/reading-pdf-files-into-r-for-text-mining/ . The first few steps worked out fine but i realize that i have to somehow connect the PDF files to the list in R. I think i have correctly used the instructions to use the function xpdf in windows.
Below is my coding in R so far.
library(tm)
files <- list.files(pattern = "pdf$")
Rpdf <- readPDF(control = list(text = "-layout"))
Comments <- Corpus(URISource(files),
readerControl = list(reader = Rpdf))
Comments.tdm <- TermDocumentMatrix(Comments, control = list(removePunctuation = TRUE,
stopwords = TRUE,
tolower = TRUE,
stemming = TRUE,
removeNumbers = TRUE,
bounds = list(global = c(3, Inf))))
This is my first question ever on this forum (quite the beginner), so if anything is unclear or i formulated this question wrong i would gladly hear it.