尝试使用fix()时,Mac OS X 10.13上的RStudio无法获得X11错误 [英] RStudio on Mac OS X 10.13 getting X11 is not available error when trying to use fix()
问题描述
我已经使用自制软件在计算机上安装了XQuartz,然后重新启动计算机,当我尝试在RStudio中使用fix()命令时出现以下错误
I have installed XQuartz on my machine using homebrew and then I restarted my machine, when I try to use the fix() command in RStudio I get the following error
> College=read.csv("College.csv",header=T,na.strings ="?")
> fix(College)
Error in edit.data.frame(get(subx, envir = parent), title = subx, ...) :
X11 is not available
当我在终端中尝试以下操作时,它会按预期工作.如何在RStudio中使用相同的命令
When I try to the following in terminal it works as expected. How can I make the same command work in RStudio
推荐答案
将此作为答案,以防其他人找到它.
Putting this as an answer in case other find this.
这个特殊的问题是由于在macOS上使用Homebrew R而造成的(在本Q发行时)还没有X11支持.
This particular issue was due to using Homebrew R on macOS which (at the time of this Q) didn't compile with X11 support.
我应该让OP首先执行 capabilities()
.那会显示如下内容:
I should have had the OP execute capabilities()
first. That would have displayed something like:
## jpeg png tiff tcltk X11 aqua http/ftp
## TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## sockets libxml fifo cledit iconv NLS profmem
## TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## cairo ICU long.double libcurl
## TRUE TRUE TRUE TRUE
如果 X11
是 FALSE
,则您具有不支持X11的R安装,应使用CRAN的macOS R发行版.
If X11
is FALSE
, then you have an R installation w/o support for X11 and should use the macOS R distribution from CRAN.
这篇关于尝试使用fix()时,Mac OS X 10.13上的RStudio无法获得X11错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!