本文介绍了如何在Lyx 2.0.3中安装knitr-module?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在iMac和MacBook Air上安装了Lyx 2.0.3.尝试在iMac上打开* .lyx文档时,出现以下错误消息:

I just installed Lyx 2.0.3 on my iMac and MacBook Air. When trying to open a *.lyx document on the iMac I get the following error-message:

在MacBook Air上,一切运行正常,没有任何错误.

On the MacBook Air everything runs fine without any errors.

有什么想法如何手动安装knitr模块吗?

Any ideas how to install the knitr-module manually?

谢谢

推荐答案

LyX中knitr模块的唯一要求是R:您必须确保可执行文件Rscript在您的PATH中;您可以通过以下方式对其进行测试:

The only requirement of the knitr module in LyX is R: you have to make sure the executable Rscript is in your PATH; you can test it by:

which Rscript

如果看到Rscript的路径,就可以开始使用了(工具->重新配置);否则,您必须告诉LyX Rscript在哪里(将路径添加到PATH prefix):

If you see the path to Rscript, you are ready to go (Tools-->Reconfigure); otherwise you have to tell LyX where is Rscript (add the path to PATH prefix):

然后重新配置LyX.

您可以通过在R中执行以下操作来获取Rscript的路径:

You can get the path to Rscript by executing this in R:

R.home('bin')

这篇关于如何在Lyx 2.0.3中安装knitr-module?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 10:21