参数中的循环不起作用,并且我收到此消息:
Error: Invalid YAML front matter (ends with ':')
YAML是:
---
title: "Growth"
date: "16 de julho de 2019"
output:
html_document:
toc: true
toc_depth: 5
params:
data:
default
---
我在其他帖子中看到了default
的内容,但他也没有工作。
代码如下:
data <- params$data
company <- c("usim5_test.pkl", "vale_test.pkl", "csn_test.pkl", "GGBR4_test.pkl")
for (i in company) {
rmarkdown::render(
input = "C:\\Users\\Rafael\\Documents\\ibov\\gurufocus\\macro\\growth_ibov1.Rmd",
output_file = paste0("Growth_",str_sub(i, 1,5),".html"),
params = list(
data = i
)
)
}
我希望呈现所有文件的报告