R: read PDF

From OnnoWiki
Revision as of 11:03, 6 November 2018 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

dengan pdftools

install.packages("pdftools")
library(pdftools)
text <- pdf_text("folder/tempat/data/namafile.pdf")
text <- pdf_text("data/BUSINESSCENTER.pdf")

dengan tm

install.packages("tm")
library(tm)
read <- readPDF(control = list(text = "-layout"))
document <- Corpus(URISource("./71_PV.62.pdf"), readerControl = list(reader = read))
doc <- content(document1)
head(doc)


Pranala Menarik