ph_with_table

0th

Percentile

add table

add a table as a new shape in the current slide.

Usage
ph_with_table(x, value, type = "title", index = 1, first_row = TRUE,
  first_column = FALSE, last_row = FALSE, last_column = FALSE)

ph_with_table_at(x, value, left, top, width, height, first_row = TRUE, first_column = FALSE, last_row = FALSE, last_column = FALSE)

Arguments
x

a pptx device

value

data.frame

type

placeholder type

index

placeholder index (integer). This is to be used when a placeholder type is not unique in the current slide, e.g. two placeholders with type 'body'.

first_row, last_row, first_column, last_column

logical for PowerPoint table options

left, top

location of the new shape on the slide

width, height

shape size in inches

Aliases
  • ph_with_table
  • ph_with_table_at
Examples
# NOT RUN {
library(magrittr)

doc <- read_pptx() %>%
  add_slide(layout = "Title and Content", master = "Office Theme") %>%
  ph_with_table(value = mtcars[1:6,], type = "body",
    last_row = FALSE, last_column = FALSE, first_row = TRUE)

print(doc, target = "ph_with_table.pptx")

library(magrittr)

doc <- read_pptx() %>%
  add_slide(layout = "Title and Content", master = "Office Theme") %>%
  ph_with_table_at(value = mtcars[1:6,],
    height = 4, width = 8, left = 4, top = 4,
    last_row = FALSE, last_column = FALSE, first_row = TRUE)

print(doc, target = "ph_with_table2.pptx")
# }
Documentation reproduced from package officer, version 0.1.5, License: GPL-3

Community examples

Looks like there are no examples yet.