[英]Two problems rendering a qmd file with quarto_render from R
I have a file my_file_to_render.qmd written in RStudio with R. I am trying to render this file with output html format from a file wrapper.R.我有一个用 RStudio 和 R 编写的文件 my_file_to_render.qmd。我试图用 output html 格式从文件 wrapper.R 渲染这个文件。 In wrapper.R I am using:在 wrapper.R 我正在使用:
a_param = "a_name"
quarto_render(input = "my_file_to_render.qmd",
output_file = paste0(".\\HTML\\my_file_to_render","_",today(), '.html'),
execute_params =list(pcn = a_param),
output_format='html')
I'm encountering two problem which I can't work out.我遇到了两个我无法解决的问题。
Could anybody help?有人可以帮忙吗?
Phil,菲尔,
The main issue you're running into is that Quarto is currently fairly particular about the folders it renders to.您遇到的主要问题是 Quarto 目前对它呈现的文件夹相当挑剔。
Quarto makes a number of assumptions on the directory structure, and rendering to a different folder will probably break that. Quarto 对目录结构做了一些假设,渲染到不同的文件夹可能会破坏它。 Ideally we wouldn't allow output files to be on different folders and flag that as an error, but right now we are not preventing that.理想情况下,我们不允许 output 文件位于不同的文件夹中并将其标记为错误,但现在我们并没有阻止这种情况。 I suggest you first render to a different name, and then move the file and its folders wherever you want.我建议您首先渲染为不同的名称,然后将文件及其文件夹移动到您想要的任何位置。
What you're suggesting should work if you first render them to different file names in the same folder.如果您首先将它们呈现为同一文件夹中的不同文件名,那么您的建议应该有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.