cod3min3
cod3min3

Reputation: 625

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

> 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

Upvotes: 3

Views: 4755

Answers (1)

hrbrmstr
hrbrmstr

Reputation: 78792

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.

Upvotes: 7

Related Questions