我正在尝试使用Quarto将我的Rmarkdown文件转换为Quarto文档。在我的旧Rmarkdown文件中,我会使用
但我似乎无法在.qmd中使其工作。我收到的错误是
source("R_datacleaning.R")
和source("R_Functions.R")
来运行数据清理并加载一些函数。我还尝试过source(here("R_Functions.R"))
,但它也不起作用。R脚本和qmd文件位于同一目录中。但我似乎无法在.qmd中使其工作。我收到的错误是
Error: RStudio not running
。我搜索了一下并查看了Quarto文档,但没有找到任何相关内容。我认为我可能没有完全理解RStudio中的Quarto环境。感谢您的任何帮助!---
title: "quarto_test2"
format: html
---
```{r}
library(here)
source(here("R_Functions.R"))
```
错误信息是:
processing file: quarto_test2.qmd
|.......... | 14%
ordinary text without R code
|.................... | 29%
label: unnamed-chunk-1
Quitting from lines 7-10 (quarto_test2.qmd)
Error: RStudio not running
Execution halted
R_Functions.R
与之前提到的quarto_test2.qmd
在同一目录中。
版本信息
- RStudio 版本为
2022.07.2
。 - R 版本为
4.2.0
。 - Quarto 版本为
1.1.245
。
quarto
和Rstudio版本信息。 - shafeesource()
函数在.qmd中不能正常工作的问题。可能是目录问题,或者与knitr有关,我还没有理解清楚。无论如何,如果您真的需要,我仍将更新主帖子并包含一个reprex。 - A. Piongsource()
,到目前为止都没有遇到问题 :) - shafeesource()
来读取.R文件?list.files()
可以正确地指向我的目录,并打印出“quarto_test2.qmd”
以及“R_Functions.R”
。此外,无论是否包括here()
,问题/错误都没有改变。 - A. Piong