X11 is not available in R
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)
What do you get with:
Sys.getenv("DISPLAY")
Might be something along the lines of:
"/private/tmp/com.apple.launchd.KImNTikz8K/org.macosforge.xquartz:0"
Also run:
capabilities()
You have to have a local X server, so get XQuartz because you are on MacOS.
If you were on Ubuntu you could install the virtual framebuffer X11 server like said here:
apt-get install xvfb xauth xfonts-base
Now that you have X virtual framebuffer installed, you can start a new instance like said here:
Xvfb :0 -ac -screen 0 1960x2000x24 &
Then if your R is compiled with with-x
configuration option (enabled by default), you should have X11 capability, and you just have to declare this in R:
Sys.setenv("DISPLAY"=":0")