在 R markdown 中指定自定义 powerpoint 主题

Specify custom powerpoint theme in R markdown

我正在使用 R markdown 创建演示文稿。这是示例代码:

---
title: "Untitled"
author: "April 2018"
date: "4/9/2019"
output: powerpoint_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Slide with Plot

```{r pressure, fig.width=30, fig.asp=0.618, 
   out.width="200%"}
plot(pressure)
``` 

我想应用我的组织指定的自定义模板。如何指定自定义主题?我在网上看到这可以指定为:

---
title: "Untitled"
author: "April 2018"
date: "4/9/2019"
output: powerpoint_presentation:
  reference_doc: my_theme.pptx 
---

但是这是如何工作的呢?我必须在哪里存储 my_theme.pptx 文件?

我希望你现在不需要这个答案,但仅供所有像我一样寻求答案的人参考。

转到 >> R\win-library\version 例如4.0\officer >>> 将您的自定义模板粘贴到此路径。

它会起作用