相关疑难解决方法(0)

让.Rprofile在启动时加载

我有一个全局~/.Rprofile文件和另一个.Rprofile位于我项目当前工作目录中的文件,它们都具有以下内容:

.First() <- function() {
options(rstudio.markdownToHTML = 
  function(inputFile, outputFile) {      
    system(paste("pandoc", shQuote(inputFile), "-s --webtex -o", shQuote(outputFile)))
  }
)  
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我打开RStudio应用程序时,它们似乎都没有工作.我正在尝试做的目的是使"Knit HTML"按钮渲染Markdown文件,该文件具有内联LaTeX,使用webtex作为LaTeX渲染器通过Pandoc进行处理.

有谁知道我如何检查我的.Rprofile文件是否在启动时加载?

谢谢你的帮助!

POST ANSWER EDIT(在Josh的回答之后): 为了清楚起见,我的工作项目的.Rprofile文件(有效)现在如下所示:

options(rstudio.markdownHTML =
  function(inputFile, outputFile) {
    system(paste("pandoc", shQuote(inputFie), "-s --webtex -o", shQuote(outputFile)))
  }
)
 \\ you will need to end with a blank carriage return underneath
Run Code Online (Sandbox Code Playgroud)

r pandoc rstudio rprofile

10
推荐指数
1
解决办法
9326
查看次数

标签 统计

pandoc ×1

r ×1

rprofile ×1

rstudio ×1