问题描述
我正在OSX Mavericks 10.9.1上运行Rstudio 0.98.501和R 3.02.我已经安装了XQuarts.我已经加载了这些软件包:
I'm running Rstudio 0.98.501 with R 3.02 on OSX Mavericks 10.9.1. I have XQuarts installed. I have loaded these packages:
图书馆(外国)图书馆(Hmisc)库("ggplot2")库(gdata)图书馆(MASS)库(有效值)
library(foreign)library(Hmisc)library("ggplot2")library(gdata)library(MASS)library(rms)
然后我执行此操作:模型1<-lrm(Y〜xvars,data = devset,x = T,y = T)
Then I do this I do this:model1 <- lrm(Y~xvars, data=devset, x=T, y=T)
val.model1< -validate(model1,B = 50)
val.model1 <-validate(model1, B=50)
我收到此错误:
结构错误(.External(.C_dotTclObjv,objv),class ="tclObj")[tcl]无效的命令名称"toplevel".
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj")[tcl] invalid command name "toplevel".
有人有什么秘诀吗?
推荐答案
嘿!
我在R中运行以下命令时遇到了同样的问题-如此处所建议: http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html -我意识到我的系统上有剩余的tcl/tk 8.5安装.
I had the same issue and when running the following command in R - as suggested there: http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html - I realised that there was a remnant tcl/tk 8.5 installation on my system.
system("ls -ld/usr/local/usr/local/lib/usr/local/lib/libtcl *")
system("ls -ld /usr/local /usr/local/lib /usr/local/lib/libtcl*")
drwxr-xr-x 12 root wheel 408 24 Oct 02:21 /usr/localdrwxrwxr-x 61 root wheel 2074 30 Oct 22:43 /usr/local/lib-r-xr-xr-x 1 root wheel 4820229 21 Oct 2008 /usr/local/lib/libtcl8.5.dylib-r-xr-xr-x 1 root wheel 1419604 30 Mar 2013 /usr/local/lib/libtcl8.6.dylib-rw-r--r-- 1 root wheel 11072 21 Oct 2008 /usr/local/lib/libtclstub8.5.a-rwxr-xr-x 1 root wheel 4824 30 Mar 2013 /usr/local/lib/libtclstub8.6.a
drwxr-xr-x 12 root wheel 408 24 Oct 02:21 /usr/localdrwxrwxr-x 61 root wheel 2074 30 Oct 22:43 /usr/local/lib-r-xr-xr-x 1 root wheel 4820229 21 Oct 2008 /usr/local/lib/libtcl8.5.dylib-r-xr-xr-x 1 root wheel 1419604 30 Mar 2013 /usr/local/lib/libtcl8.6.dylib-rw-r--r-- 1 root wheel 11072 21 Oct 2008 /usr/local/lib/libtclstub8.5.a-rwxr-xr-x 1 root wheel 4824 30 Mar 2013 /usr/local/lib/libtclstub8.6.a
删除旧的8.5文件对我来说解决了这个问题.
Removing the old 8.5 files fixed the problem for me.
HTH
这篇关于我从rms包运行“验证"时出现TCLK错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!