2

I've run into a problem with getting tcltk to run properly on r-gui. It's a required package for one of the packages (aplpack) I'd like to work with.


Preliminary Stuff
13" Macbook Air
OSX Yosemite - Version 10.10.5
R Version 3.2.3
R.app GUI 1.66 (6956) x86_64-apple-darwin14.5.0

r and r-gui were installed via homebrew


I installed aplpack in order to use the bagplot function. Upon loading the package I received the following output:

Loading required package: tcltk 2015-12-23 09:44:11.134 R[6529:31353] -[NSApplication _setup:]: unrecognized selector sent to instance 0x60800011b3f0 2015-12-23 09:44:11.135 R[6529:31353] *** run_REngineRmainloop: exception -[NSApplication _setup:]: unrecognized selector sent to instance 0x60800011b3f0 caught during REPL iteration. Update to the latest GUI version and consider reporting this properly (see FAQ) if it persists and is not known. Consider saving your work soon in case this develops into a problem.

The session became unresponsive and I had to force quit.

To try and solve the problem, I checked to see if tcltk was installed:

> capabilities()["tcltk"]

tcltk
TRUE

It was also available via the package manager but trying to load it, both through the gui and using library("tcltk") caused R to become unresponsive and resulted in an identical error:

2015-12-23 09:49:24.370 R[6571:33844] -[NSApplication _setup:]: unrecognized selector sent to instance 0x608000108f70 2015-12-23 09:49:24.370 R[6571:33844] *** run_REngineRmainloop: exception -[NSApplication _setup:]: unrecognized selector sent to instance 0x608000108f70 caught during REPL iteration. Update to the latest GUI version and consider reporting this properly (see FAQ) if it persists and is not known. Consider saving your work soon in case this develops into a problem.

Some googling led me to do the following:

  • uninstall r-gui via homebrew
  • uninstall r via homebrew
  • download and install the most recent version of xquartz
  • installed homebrew/dupes/tcl-tk (which I thought was supposed to fix the issue)
  • ran brew update
  • ran brew upgrade
  • ran brew doctor
  • installed r via homebrew
  • installed r-gui via homebrew

After taking the above steps, I'm still running into the same issue as before. Here is the output of sessionInfo():

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils
datasets methods base

Following the advice in the Mac OSX FAQ (to attempt to replicate the issue), I opened the r in terminal and was able to not only load tcltk, but also aplpack:

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin14.5.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils
datasets methods base

library("aplpack") Loading required package: tcltk sessionInfo() R version 3.2.3 (2015-12-10) Platform: x86_64-apple-darwin14.5.0 (64-bit) Running under: OS X 10.10.5 (Yosemite)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] tcltk stats graphics grDevices utils datasets methods [8] base

other attached packages: [1] aplpack_1.3.0


I believe that the issue with loading tcltk is interfering with loading aplpack and that something in R.app/r-gui is not playing nicely with tcltk.

jrp355
  • 83
  • 8
  • So… what actually is the question? – Donal Fellows Dec 23 '15 at 18:47
  • @Donal Fellows, I'm sorry for my lack of clarity. I'm not sure exactly what the errors mean and it would be nice to have an english translation. Also, I was hoping someone would be able to suggest a work around/solution for me to be able to run tcltk in R.app or at the very least suggest a place for me to start (beyond what I've already tried). – jrp355 Dec 23 '15 at 18:55
  • Ah, the error means that everything is messed up. Do you have the exact version of the Tcl and/or Tk library that you're using available? (They're typically a matched pair.) There's been a lot of fixing of the OSX version of Tk relatively recently that hasn't necessarily made it into the system version of Tk yet. – Donal Fellows Dec 24 '15 at 09:11
  • @Donal Fellows, the version of tcl I'm using is 8.5 (patch level 8.5.9). – jrp355 Dec 28 '15 at 17:56

1 Answers1

0

To my understanding

install.packages("tcltk")

Returns

package ‘tcltk’ is not available (for R version 3.2.3)

A work around would be to use the previous version of R which is compatible with tcltk.

ZeissS
  • 11,867
  • 4
  • 35
  • 50
Nicolas Stifani
  • 573
  • 6
  • 11