X11 在 R 中不可用 [英] X11 is not available in R

查看:47
本文介绍了X11 在 R 中不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我正在执行一些代码并收到与 X11 相关的错误.为了重现我的错误,我运行了 x11() 并得到以下结果:

I'm following along some code and get an error related to X11. To recreate my error, I ran x11() and got the following:

> x11()
Error in x11() : X11 is not available

我肯定已经在 R 中绘制了加载 XQuartz 程序以显示的内容.

I have definitely plotted things in R that loaded the XQuartz program to display.

我的尝试

  • 我做了 ?x11() 并看到它来自 {grDevices} 包.我加载了那个库,再试一次,但得到了同样的错误.我读到 X11 与 XQuartz 相关.
  • 我重新安装了 XQuartz 2.7.8.我有 R 3.2.3 并且正在运行 OSX El Capitan 版本 10.11.4 (15E65).重新安装后我重新启动了两次.
  • install.packages("Cairo")

  • I did ?x11() and saw that it is from the {grDevices} package. I loaded that library, tried again, but got the same error. I read that X11 is related to XQuartz.
  • I re-installed XQuartz 2.7.8. I have R 3.2.3 and am running OSX El Capitan version 10.11.4 (15E65). I restarted twice after re-installing.
  • install.packages("Cairo")

<代码>>x11(宽=3,高=3)x11 中的错误(宽度 = 3,高度 = 3):X11 不可用

<代码>>Sys.getenv("显示")[1] "/private/tmp/com.apple.launchd.F1bsaVCA43/org.macosforge.xquartz:0"

<代码>>能力()jpeg png tiff tcltk X11 aqua http/ftp对对对对对错对错对错套接字 libxml fifo cledit iconv NLS profmem真真真真真真真真真开罗 ICU long.double libcurl对对对对对

- 谷歌研究

我使用我的错误消息在 Google 上搜索并搜索了结果的前两页,但没有找到任何有效的解决方案.根据我对解决方案的阅读,我在上面提供了我的系统信息,因为它似乎以某种方式相关.任何想法/解决方案/新线索将不胜感激.

I Googled using my error message and searched through the first two pages of my results but didn't find any solutions that worked. Based on my perusal of solutions, I provided my system information above since it seems to be relevant somehow. Any ideas/solutions/new leads would be appreciated.

推荐答案

XQuartz 包是 Mac X11,您的版本是当前版本.我想知道您是否需要在安装后重新启动,尽管我并不声称知道这一点.(修复权限可能不会有什么坏处.)在我的 Mac 上(在 El Cap 上运行 3.3.0)我需要设置宽度和高度(以英寸为单位,而不是像素或点);

The XQuartz package is the Mac X11 and your version is the current one. I'm wondering if you need to reboot after installation although I don't claim to know that. (And it might not hurt to repair permissions.) On my Mac (running 3.3.0 on El Cap) I need to set width and height (in inches, not pixels or points);

 x11( width=3, height=3)

你得到了什么:

Sys.getenv("DISPLAY")

可能是这样的:

"/private/tmp/com.apple.launchd.KImNTikz8K/org.macosforge.xquartz:0"

同时运行:

capabilities()

这篇关于X11 在 R 中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆