text_extract: Simple Text Extraction From a Word Document

Description Usage Arguments Value See Also Examples

View source: R/text_extract.R

Description

Provides a simple method to get text from a docx document. It returns a character vector containing all chunk of text found in the document.

Usage

1
text_extract(x, body = TRUE, header = TRUE, footer = TRUE, bookmark)

Arguments

x

docx object

body

specifies to scan document body

header

specifies to scan document header

footer

specifies to scan document footer

bookmark

a character value ; id of the Word bookmark to scan.

Value

a character vector

See Also

docx, list_bookmarks

Examples

1
2
3
4
5
doc <- docx( title = "My example", template = file.path(
  system.file(package = "ReporteRs"), "templates/bookmark_example.docx") )
text_extract( doc )
text_extract( doc, header = FALSE, footer = FALSE )
text_extract( doc, bookmark = "author" )

ReporteRs documentation built on April 1, 2018, 12:06 p.m.