Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install tcltk in R?

Tags:

r

My system is: debian6 + r-2.15.

I have installed tcl-devel and tk-devel with apt-get:

apt-get install tcl8.5-dev tk8.5-dev

But I'm getting the following error

> library("tcltk") 
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Tcl/Tk support is not available on this system
In addition: Warning message:
S3 methods ‘$.tclvar’, ‘$<-.tclvar’, ‘as.character.tclObj’, ‘as.character.tclVar’,  
‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, 
‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, 
‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, 
‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’,
‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found 
Error: package/namespace load failed for ‘tcltk’
> install.packages('tcltk')
Warning message:
package ‘tcltk’ is not available (for R version 2.15.1) 

How can I install tcltk in my R?


Edit

> capabilities()["tcltk"]
tcltk 
FALSE 

I compiled R-2.15.1 to install it on debian6.04, but how can I do now in order to run tcltk?

like image 828
Fnzh Xx Avatar asked Aug 09 '12 00:08

Fnzh Xx


People also ask

What is Tcltk R package?

The tcltk package of the R programming language gives you simple access to the Tcl/Tk toolkit originally developed by John Ousterhout. This toolkit provides a variety of widgets, and has been ported to many computer platforms.

How do I install TCL TK on Windows 10?

Installation on Windows Download the latest version for windows installer from the list of Active Tcl binaries available. The active Tcl community edition is free for personal use. Run the downloaded executable to install the Tcl, which can be done by following the on screen instructions.


1 Answers

I think you are doing this wrong.

Read the README at http://cran.r-project.org/bin/linux/debian/ to learn how to get the current R version for your Debian version (be it stable or testing). This version already has support for the tcltk package which comes with R, provided R is built the right way. Which is easiest to assure with a proper pre-built version.

You can check that by looking at capabilities():

R> capabilities()["tcltk"]
tcltk 
 TRUE 
R> 
like image 167
Dirk Eddelbuettel Avatar answered Nov 13 '22 01:11

Dirk Eddelbuettel