RStudio on Mac OS X 10.13 getting X11 is not available error when trying to use fix()

强颜欢笑 提交于 2020-01-13 19:50:11

问题


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

When I try to the following in terminal it works as expected. How can I make the same command work in RStudio


回答1:


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.

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 

If X11 is FALSE, then you have an R installation w/o support for X11 and should use the macOS R distribution from CRAN.



来源:https://stackoverflow.com/questions/47898202/rstudio-on-mac-os-x-10-13-getting-x11-is-not-available-error-when-trying-to-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!