这里的基本问题 - 我如何使用模板创建带有 {officedown} 的 powerpoint 文档。在这个阶段,文档几乎是空的。我可以在没有模板的情况下创建 Power Point 文件,但是在添加以下 YAML 标头时:
output:
officedown::rpptx_document:
reference_doc: Template.pptx
我明白了
Error: `x` must be a string of length 1
In addition: Warning message:
In fortify_location.location_label(location, doc = x) :
more than a row have been selected
Execution halted
我尝试将“reference_doc”更改为参考“reference_docx”和“reference_pptx”,但无济于事。
请注意:
- 使用 {officedown} 模板创建 Word 文件没有问题
- 该模板已与 output:powerpoint_presentation: 一起使用 - 它具有降价所需的所有点点滴滴
谢谢!卡洛斯
我的 sessionInfo() 输出是
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] officedown_0.2.3.001
loaded via a namespace (and not attached):
[1] zip_2.1.1 Rcpp_1.0.6 RColorBrewer_1.1-2 compiler_4.1.0 pillar_1.6.1 remotes_2.3.0 tools_4.1.0
[8] uuid_0.1-4 digest_0.6.27 memoise_2.0.0 lubridate_1.7.10 evaluate_0.14 lifecycle_1.0.0 tibble_3.1.2
[15] gtable_0.3.0 checkmate_2.0.0 lattice_0.20-44 pkgconfig_2.0.3 rlang_0.4.11 DBI_1.1.1 yaml_2.2.1
[22] rgdal_1.5-23 xfun_0.23 fastmap_1.1.0 xml2_1.3.2 officer_0.3.18 metR_0.9.2 dplyr_1.0.6
[29] knitr_1.33 systemfonts_1.0.2 gdtools_0.2.3 generics_0.1.0 vctrs_0.3.8 gtools_3.8.2 grid_4.1.0
[36] tidyselect_1.1.1 glue_1.4.2 data.table_1.14.0 R6_2.5.0 rvg_0.2.5 fansi_0.5.0 rmarkdown_2.8
[43] librarian_1.7.0 sp_1.4-5 ggplot2_3.3.3 purrr_0.3.4 magrittr_2.0.1 backports_1.2.1 scales_1.1.1
[50] htmltools_0.5.1.1 ellipsis_0.3.2 assertthat_0.2.1 colorspace_2.0-1 utf8_1.2.1 munsell_0.5.0 cachem_1.0.5
[57] crayon_1.4.1
```