【发布时间】:2019-12-26 09:31:55
【问题描述】:
当我使用这些 YAML 参数运行 render("test.Rmd") 时,输出仍然是 test.docx 而不是 teeeeeeeest.docx:
---
title: "mytitle"
author: "Me, myself and I"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: word_document
output_file: "teeeeeeeest.docx"
---
但是,如果我在渲染函数中设置参数 (rmarkdown::render("test.Rmd", output_file = "teeeeeeeest.docx")),它可以正常工作。
是否可以在 YAML 标头中设置 output_file 参数?否则,我的目的是在使用 RStudio 编织时将当前日期包含在输出文件名中,我该怎么做?
【问题讨论】:
-
也许这会对你有所帮助:stackoverflow.com/questions/28500096/…
标签: r-markdown