Sweave、Eclipse 和 R 入门
我对 LaTex 和 R 很陌生,但我每天都在学习。我真的很喜欢使用 Eclipse,并且想加入这个行列并开始使用 Sweave 自动化我的工作;我对前景感到兴奋。
也就是说,我在此处关注了 Jeromy 的帖子 并认为(关键字,认为)一切都设置正确。但是,由于我对 LaTex 非常陌生,我如何测试它才能知道我是否已启动并运行并且确实可以创建 pdf?
简而言之,我想在开始深入研究模板和创建报告之前测试我的配置是否已启动并运行。在 Eclipse 中创建 pdf 的基本过程是什么?
任何帮助将非常感激!
谢谢,
布洛克
I am very new to LaTex and R, but I am learning on a daily basis. I really am getting into using Eclipse and want to join the party and start automating my work using Sweave; I am excited for the prospects.
That said, I followed Jeromy's post here and think (keyword, think) that everything is set up correctly. However, since I am very new to LaTex, how can I test it to know that I am up and running and can indeed create pdf's?
Simply, I want to test that my configurations are up and running before I start diving into templates and creating reports. What is the basic process, from within Eclipse, to create a pdf?
Any help will be very much appreciated!
Thanks,
Brock
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,假设您在 Eclipse 中使用 StatEt,那么请确保您已完成以下操作;
偏好? StatEt 和设置
比如你的 R 环境。
首选项> Texclipse,并告诉它
你的乳胶命令所在的地方(我是
在 Windows 上,所以这是 c:\program
files\miktex\miktex\
安装在您的 R 中
环境
配置,转到“运行”>跑步
配置,单击新建图标
并输入诸如 R 之类的内容
环境,工作目录
以及您想要的任何参数。
外部工具>外部工具
配置,单击新图标
在 Sweave 下,我想我离开了
一切默认,运行 sweave
R 控制台并运行 pdflatex
然后创建一个 eclipse 项目,并在该项目中创建一个新的 Sweave 文档,StatEt 应该为您提供一个将成功构建的骨架模板,因此然后打开 R 控制台(从图标或通过 Run > >)运行为),然后选择 Sweave 骨架文档选项卡,运行 Sweave(通过图标,或通过运行 > 外部工具 > 无论您如何称呼它),
然后您应该看到 R 位出现在 R 控制台中,然后Latex'y 位发生在后台,窗口底部有一个小进度条。最终它会完成并弹出一个新的(空白)PDF。
瞧!
我还推荐这个指南 和这个一个
Right, assuming you're using StatEt within Eclipse, then make sure you've done the following;
Preferences ? StatEt, and setup
things like your R environment.
Preferences > Texclipse, and tell it
where your latex commands live (I'm
on Windows, so this was c:\program
files\miktex\miktex\
is installed within your R
environment
configuration, goto Run > Run
Configurations, click the New icon
and enter things like the R
environment, the working directory
and any parameter's you want.
External Tools > Externals Tool
Configurations, click the new icon
under Sweave and I think I left
everything default, to run sweave in
the R console and run pdflatex
Then create an eclipse project, and within that project create a new Sweave document, StatEt should give you a skeleton template that will succesfully build, so then open the R console (either from the icon or via Run > Run As), then with your Sweave skeleton document tab selected, run Sweave (either via the icon, or via Run > External Tools > Whatever you called it)
You should then see the R bits occur in the R console, then the latex'y bits happening in the background and a little progress bar at the bottom of the window. Eventually it will finish and a new (blank) PDF will pop up.
Voila !
I'd also recomend this guide and this one
虽然这个问题很久以前就被问到了,但我想我还是分享一下我是如何解决113错误的。基本上,您必须将 R 工作目录更改为工作空间中包含 .Rnw 文件的位置。完成后,Sweave 在我的机器上完美运行。
最好的,托马斯
Although this was asked a long time ago, I thought I would share how I solved the 113 error. Basically you have to change the R working directory to where in your workspace you have the .Rnw file. Once this was done Sweave ran perfectly on my machine.
Best, Thomas