Description Usage Arguments Examples
add flextable into layout placeholder
1 | phl_with_flextable(x, olay, id, value)
|
x |
rpptx object |
olay |
an OfficerLayout object created using |
id |
an single integer with an id of the placeholder from olay object. |
value |
a |
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 | library(officer)
lay <- lay_new(matrix(1:4,nc=2),widths=c(3,2),heights=c(2,1))
lay2 <- lay_new(matrix(1:3))
lay3 <- lay_bind_col(lay,lay2, widths=c(3,1))
offLayout <- phl_layout(lay3)
pptx <- read_pptx()
pptx <- add_slide(
pptx,
master = "Office Theme",
layout = "Title and Content"
)
# add table to pptx file
x <- tail(iris, 10)[,c(1,5)]
xf <- phl_adjust_table(x, offLayout, 1)
pptx <- phl_with_flextable(pptx, offLayout, 1, xf)
x2 <- tail(iris, 10)[,c(1,5)]
xf2 <- phl_adjust_table(x, offLayout, 2)
pptx <- phl_with_flextable(pptx, offLayout, 2, xf2)
## Not run:
file <- tempfile(fileext = ".pptx")
print(pptx, target = file)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.