Skip to content
Prev 10698 / 15075 Next

Mac OS X tcltk/X11 issues

On Jul 14, 2014, at 4:53 PM, Marc Schwartz <marc_schwartz at me.com> wrote:

            
A possible correction in the above code relative to detecting OS X:

if ((Sys.info()["sysname"] == "Darwin") & length(list.files("/opt/X11/bin", pattern = "Xquartz")) == 0) {
    cat("X11 is required. Please visit http://xquartz.macosforge.org to download and install Xquartz.")
    stop()
}


I believe that Sys.info()["sysname"] == "Darwin" is preferred for detecting the OS that R is running on versus the OS that it was built upon according to the help files, if I read correctly. This could be important if someone is building R from source versus installing Simon's CRAN binary, I presume.

Regards,

Marc