安装/使用 Cairo / R 2.12.1 的困难
我为我的系统(CentOS)编译了R版本2.12.1(2010-12-16),然后安装了Cairo_1.4-5。
当我批量调用我的脚本时,我想使用 Cairo 生成图形的 PNG(也可能是 PDF)输出,但这在我使用 X 时给我带来了困难(我通过 ssh 隧道传输 X,它经常在 R 时断开连接)脚本正在运行...),所以这就是我想使用开罗的原因。
(顺便说一句,我没有 root 访问权限)。
虽然它是根据 sessionInfo 安装的
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
,但我无法调用 CairoPDF:
> CairoPDF()
Error: could not find function "CairoPDF"
奇怪的是,我可以调用名为 cairo_pdf 的函数
> cairo_pdf()
>
我无法调用 CairoPNG、cairo_PNG 或 cairo_png:
> CairoPNG()
Error: could not find function "CairoPNG"
> cairo_PNG()
Error: could not find function "cairo_PNG"
> cairo_png()
Error: could not find function "cairo_png"
我的安装有问题吗?坦率地说,我不知道如何从这里继续,为什么我什至不能调用 CairoPNG()?
I have compiled R version 2.12.1 (2010-12-16) for my system (CentOS), and afterwards I installed Cairo_1.4-5.
I'd like use Cairo to produce PNG (and maybe PDF) output of my graphs when I batch-invoke my scripts, but this gives me difficulties when I am using X (I am tunneling X through ssh and it often disconnects while the R scripts are running...), so this is why I want to use Cairo.
(I do not have root access btw).
Although it's installed according to sessionInfo
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
I can not call CairoPDF:
> CairoPDF()
Error: could not find function "CairoPDF"
Weirdly, I can invoke a function called cairo_pdf
> cairo_pdf()
>
I can not call CairoPNG, cairo_PNG or cairo_png:
> CairoPNG()
Error: could not find function "CairoPNG"
> cairo_PNG()
Error: could not find function "cairo_PNG"
> cairo_png()
Error: could not find function "cairo_png"
Is something wrong withmy installation? Frankly I have no idea how to proceed from here, why can't I even call CairoPNG()?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Ubuntu 上我有:
然后运行库(Cairo),如果没有安装
这意味着您必须安装 Cairo R 包,它与 Cairo 图形系统交互
它将下载、构建和安装该包 - 您不需要 root 话
如果成功的
,你可以运行HTH
On Ubuntu I have:
Then run library(Cairo), if this is not installed
This means you will have to install the Cairo R package, which interfaces with the Cairo graphics system
It will download, build and install the package - you don't need root for this
If it was successful, you can run
HTH
这应该做:
This should do: