[英]How to install tcltk in R?
My system is: debian6 + r-2.15. 我的系统是:debian6 + r-2.15。
I have installed tcl-devel
and tk-devel
with apt-get
: 我用apt-get
安装了tcl-devel
和tk-devel
:
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? 如何在我的R中安装tcltk
?
> 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
? 我编译了R-2.15.1将它安装在debian6.04上,但是为了运行tcltk
我现在怎么办呢?
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). 阅读http://cran.r-project.org/bin/linux/debian/上的自述文件,了解如何获取Debian版本的当前R版本(无论是稳定还是测试)。 This version already has support for the tcltk
package which comes with R, provided R is built the right way. 这个版本已经支持R附带的tcltk
软件包,只要R以正确的方式构建。 Which is easiest to assure with a proper pre-built version. 这是最容易确保使用适当的预建版本。
You can check that by looking at capabilities()
: 您可以通过查看capabilities()
来检查:
R> capabilities()["tcltk"]
tcltk
TRUE
R>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.