Description Usage Arguments Value Examples
View source: R/read_document.R
Generic function to read in a .pdf, .txt, .html, .rtf, .docx, or .doc file.
1 2 3 4 5 6 7 8 9 10 |
file |
The path to the a .pdf, .txt, .html, .rtf, .docx, or .doc file. |
skip |
The number of lines to skip. |
remove.empty |
logical. If |
trim |
logical. If |
combine |
logical. If |
format |
For .doc files only. Logical. If |
ocr |
logical. If |
... |
Other arguments passed to |
Returns a base::list()
of string base::vector()
s.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ## .pdf
pdf_doc <- system.file("docs/rl10075oralhistoryst002.pdf",
package = "textreadr")
read_document(pdf_doc)
## .html
html_doc <- system.file("docs/textreadr_creed.html", package = "textreadr")
read_document(html_doc)
## .docx
docx_doc <- system.file("docs/Yasmine_Interview_Transcript.docx",
package = "textreadr")
read_document(docx_doc)
## .doc
doc_doc <- system.file("docs/Yasmine_Interview_Transcript.doc",
package = "textreadr")
read_document(doc_doc)
## .txt
txt_doc <- system.file('docs/textreadr_creed.txt', package = "textreadr")
read_document(txt_doc)
## .pptx
pptx_doc <- system.file('docs/Hello_World.pptx', package = "textreadr")
read_document(pptx_doc)
## .rtf
## Not run:
rtf_doc <- download(
'https://raw.githubusercontent.com/trinker/textreadr/master/inst/docs/trans7.rtf'
)
read_document(rtf_doc)
## End(Not run)
## Not run:
## URLs
read_document('http://www.talkstats.com/index.php')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.