I am looking to create multiple 2 column PowerPoint slides using RMarkdown from a loop. This will allow the number of slides to be dynamic based on the input data. The normal syntax to do this is:
:::::::::::::: {.columns}
::: {.column}
- Bullet 1
- Bullet 2
- Bullet 3
:::
::: {.column}
- Bullet 1
- Bullet 2
- Bullet 3
:::
::::::::::::::
However, when putting this into a loop, the column syntax is evaluated as text, not as markdown code. This results in the column code simply printing out on the slide instead of creating 2 columns.
The below code wont execute properly, but it demonstrates what I am hoping to accomplish.
list <- c("Slide 1", "Slide 2", "Slide 3")
for (slide in list) {
cat(paste0("\n\n## Summary of ", slide, " \n\n"))
:::::::::::::: {.columns}
::: {.column}
- Bullet 1
- Bullet 2
- Bullet 3
:::
::: {.column}
- Bullet 1
- Bullet 2
- Bullet 3
:::
::::::::::::::
}