[英]RStudio on Mac OS X 10.13 getting X11 is not available error when trying to use 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 我使用自制软件在计算机上安装了XQuartz,然后重新启动计算机,当我尝试在RStudio中使用fix()命令时,出现以下错误
> 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
When I try to the following in terminal it works as expected. 当我在终端中尝试以下操作时,它可以按预期工作。 How can I make the same command work in RStudio
如何在RStudio中使用相同的命令
Putting this as an answer in case other find this. 以此作为答案,以防其他人找到它。
This particular issue was due to using Homebrew R on macOS which (at the time of this Q) didn't compile with X11 support. 这个特殊问题是由于在macOS上使用Homebrew R而造成的(在此Q发行之时)还没有X11支持。
I should have had the OP execute capabilities()
first. 我应该先让OP执行
capabilities()
。 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
If X11
is FALSE
, then you have an R installation w/o support for X11 and should use the macOS R distribution from CRAN. 如果
X11
为FALSE
,那么您有不支持X11的R安装,并且应使用CRAN的macOS R发行版。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.