Learn R Programming

textreadr (version 1.2.0)

read_pptx: Read in .pptx Content

Description

Read in the content from a .pptx file.

Usage

read_pptx(
  file,
  skip = 0,
  remove.empty = TRUE,
  trim = TRUE,
  include.notes = FALSE,
  ...
)

Arguments

file

The path to the .pptx file.

skip

The number of lines to skip.

remove.empty

logical. If TRUE empty elements in the vector are removed.

trim

logical. If TRUE the leading/training white space is removed.

include.notes

logical. If TRUE then slide notes are included.

...

ignored.

Value

Returns a base::data.frame() with the slide number (slide_id), line number (element_id), and the text.

Examples

Run this code
# NOT RUN {
url <- file.path("https://www.oclc.org/content/dam/research/presentations", 
    "2019/111319-godby-NISO-What-Are-Entities-Matter.pptx")
file <- download(url)
(txt <- read_pptx(file))

pptx_doc <- system.file('docs/Hello_World.pptx', package = "textreadr")
read_pptx(pptx_doc)
read_pptx(pptx_doc, include.notes = TRUE)
# }

Run the code above in your browser using DataLab