4

I try to use tcltk in R, but the package Tktable could not be found.

> library("tcltk")
Loading Tcl/Tk... OK
> tclRequire("Tktable")
[1] FALSE
Warning :
In tclRequire("Tktable") : the package Tcl 'Tktable' is not found

When I install R (r-base-core) all this linux package are installed too :

tcl                     install
tcl-dev                 install
tcl8.5                  install
tcl8.5-dev              install
tcllib                  install
tk                      install
tk-dev                  install
tk8.5                   install
tk8.5-dev               install
tklib                   install

I tried to install manually libtktable2.9, and those packages are automatically installed :

libtktable2.9:i386          install
tk8.4:i386                  install
tcl8.4:i386                 install

I tried the fonction addTclPath in R (with different path, because I dont really understand where is the tcl location...), but nothing changes.

I saw similar posts on few forums but no answer yet.

Any idea?

Cerbrus
  • 70,800
  • 18
  • 132
  • 147
  • Waht is you OS ? did you read this http://stackoverflow.com/questions/11875307/how-to-install-tcltk-in-r? – agstudy Dec 14 '12 at 10:13
  • Sorry, I thought I mentioned my OS : it's Ubuntu 12.04. I read the post you mentioned but it is not the same problem. The package tcltk is installed on R. – Audrey Bihouée Dec 14 '12 at 11:28
  • Sorry I misunderstood the problem. – agstudy Dec 14 '12 at 15:03
  • 1
    It had been included as part of the `tcltk2` package, but this is no longer the case. There the `tablelist` package is provided. This package is used within `gWidgetstcltk` too, as it avoids this issue of installation and still provides a reasonable widget for editing cells. – jverzani Dec 14 '12 at 18:42

3 Answers3

3

http://bioinf.wehi.edu.au/affylmGUI/#testBWTk describes installing Tktable.

To install Tktable download from http://tktable.sourceforge.net. From this site, select "File Distributions, select the "tktable" link, select the latest version (currently 2.10), then select the tar.gz file (currently "Tktable2.10.tar.gz"). Save it to a suitable location, unzip and untar it (Example command is "tar zxf Tktable2.10.tar.gz"). look in the Tktable directory and read the README.txt file installation instructions.

To get Tktable to install on debian, I installed this first

sudo apt-get install tcl-dev tk-dev mesa-common-dev libjpeg-dev libtogl-dev
Jawa
  • 2,336
  • 6
  • 34
  • 39
BAMF4bacon
  • 523
  • 1
  • 7
  • 21
2

On Ubuntu 18.04, I could just install the package tk-table

sudo apt install tk-table
Tristan
  • 2,000
  • 17
  • 32
1

Just for documentation purposes for other readers:

Windows users should be aware that the Tcl extensions ‘BWidget’ and ‘Tktable’ which are included with the R for Windows installer are extensions and do need to be declared. ‘Tktable’ does ship as part of the Tcl/Tk provided on CRAN for Mac OS X, but you will need to tell your users how to make use of it:

 > addTclPath('/usr/local/lib/Tktable2.9')
 > tclRequire('Tktable')
 <Tcl> 2.9

So there is no need for an extra tcl/tk or tktable installation.

Source: http://www.pqr-project.org/R-exts.html

R Yoda
  • 8,358
  • 2
  • 50
  • 87