Posted originally on SO here.
Hello and thanks for reading. I am having trouble using the officedown
and officer
packages to insert a footer on a PPTX slide. I am able to insert a footer if the R object is of type data frame. But if I try to do the same with a string then it instead places the string in the body of the slide. There are R Markdown examples of each below. Thanks again for reading.
---
title: YAML Title
output:
officedown::rpptx_document
---
## Using a data frame, placed in the footer
```{r echo=FALSE, layout="Title and Content", ph=officer::ph_location_type(type="ftr")}
library(officedown)
test <- data.frame(1)
test
versus
---
title: YAML Title
output:
officedown::rpptx_document
---
## Using a string, placed in the body despite ph tag
```{r echo=FALSE, layout="Title and Content", ph=officer::ph_location_type(type="ftr")}
library(officedown)
"some footer text"