Re: [R] tcltk error on Linux
On Thu, 9 Aug 2007, Mark W Kimpel wrote: I am having trouble getting tcltk package to load on openSuse 10.2 running R-devel. I have specifically put my /usr/share/tcl directory in my PATH, but R doesn't seem to see it. I also have installed tk on my system. Any ideas on what the problem is? Whether Tcl/Tk would available was determined when you installed R. The relevant information was in the configure output and log, which we don't have. You are not running a released version of R: please don't use the development version unless you are familiar with the build process and know how to debug such things yourself. The rule is that questions about development versions of R should not be asked here but on R-devel (and not to R-core which I have deleted from the recipients). I suggest reinstalling R (preferably R-patched) and if tcltk still is not available sending the relevant configure information to the R-devel list. Also, note that I have some warning messages on starting up R, not sure what they mean or if they are pertinent. Those are coming from a Bioconductor package: again you must be using development versions with R-devel and those are not stable (last time I looked even Biobase would not install, and the packages change daily). If you have all those packages in your startup, please don't -- there will be a considerable performance hit so only load them when you need them. Thanks, Mark Warning messages: 1: In .updateMethodsInTable(fdef, where, attach) : Couldn't find methods table for conditional, package Category may be out of date 2: In .updateMethodsInTable(fdef, where, attach) : Methods list for generic conditional not found require(tcltk) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system sessionInfo() R version 2.6.0 Under development (unstable) (2007-08-01 r42387) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] splines tools stats graphics grDevices utils datasets [8] methods base other attached packages: [1] affycoretools_1.9.3annaffy_1.9.1 xtable_1.5-0 [4] gcrma_2.9.1matchprobes_1.9.10 biomaRt_1.11.4 [7] RCurl_0.8-1XML_1.9-0 GOstats_2.3.8 [10] Category_2.3.19genefilter_1.15.9 survival_2.32 [13] KEGG_1.17.0RBGL_1.13.3annotate_1.15.3 [16] AnnotationDbi_0.0.88 RSQLite_0.6-0 DBI_0.2-3 [19] GO_1.17.0 limma_2.11.9 affy_1.15.7 [22] preprocessCore_0.99.12 affyio_1.5.6 Biobase_1.15.23 [25] graph_1.15.10 loaded via a namespace (and not attached): [1] cluster_1.11.7 rcompgen_0.1-15 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk error on Linux
Hi Mark, Prof Brian Ripley [EMAIL PROTECTED] writes: On Thu, 9 Aug 2007, Mark W Kimpel wrote: I am having trouble getting tcltk package to load on openSuse 10.2 running R-devel. I have specifically put my /usr/share/tcl directory in my PATH, but R doesn't seem to see it. I also have installed tk on my system. Any ideas on what the problem is? Any chance you are running R on a remote server using an ssh session? If that is the case, you may have an ssh/X11 config issue that prevents using tcl/tk from such a session. Rerun the configure script for R and verify that tcl/tk support is listed in the summary. Also, note that I have some warning messages on starting up R, not sure what they mean or if they are pertinent. Those are coming from a Bioconductor package: again you must be using development versions with R-devel and those are not stable (last time I looked even Biobase would not install, and the packages change daily). BioC devel tracks R-devel, but not on a daily basis -- because R changes daily. The recent issues with Biobase are a result of changes to R and have already been fixed. If you have all those packages in your startup, please don't -- there will be a considerable performance hit so only load them when you need them. Presumably, that's why they are there in the first place. The warning messages are a problem and suggest some needed improvements to the methods packages. These are being worked on. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center BioC: http://bioconductor.org/ Blog: http://userprimary.net/user/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk error on Linux
Seth and Brian, Today and downloaded and installed the latest R-devel and tcltk now works. My suspicion is that Tcl was not on my path when R-devel was installed previously. BTW, I had though that is was a courtesy to cc: the maintainers of a package when writing either R-devel or R-help about a specific package. For tcltk, I see: Maintainer:R Core Team [EMAIL PROTECTED] If it is not appropriate to write R-core regarding packages they maintain, would it perhaps not be better to remove them as maintainers or, not suggest that people cc: maintainers of packages? Just an idea. As for the suggestion that I not use R-devel, I do that because I sometimes use BioC packages that have just been published and are only available in the devel versions of BioC. Are you suggesting that only people who can debug things themselves, and thus who do not need to write to R-devel, use R-devel? As an open-source user, I thought the philosophy was that it was useful to have users willing to test beta versions of software and have those users report problems to developers. If that is not the case, please put a stronger warning on R-devel and warn users not to use it unless they are willing to debug and take care of all problems themselves. Thanks, Mark --- Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, Mobile VoiceMail (317) 663-0513 Home (no voice mail please) ** Seth Falcon wrote: Hi Mark, Prof Brian Ripley [EMAIL PROTECTED] writes: On Thu, 9 Aug 2007, Mark W Kimpel wrote: I am having trouble getting tcltk package to load on openSuse 10.2 running R-devel. I have specifically put my /usr/share/tcl directory in my PATH, but R doesn't seem to see it. I also have installed tk on my system. Any ideas on what the problem is? Any chance you are running R on a remote server using an ssh session? If that is the case, you may have an ssh/X11 config issue that prevents using tcl/tk from such a session. Rerun the configure script for R and verify that tcl/tk support is listed in the summary. Also, note that I have some warning messages on starting up R, not sure what they mean or if they are pertinent. Those are coming from a Bioconductor package: again you must be using development versions with R-devel and those are not stable (last time I looked even Biobase would not install, and the packages change daily). BioC devel tracks R-devel, but not on a daily basis -- because R changes daily. The recent issues with Biobase are a result of changes to R and have already been fixed. If you have all those packages in your startup, please don't -- there will be a considerable performance hit so only load them when you need them. Presumably, that's why they are there in the first place. The warning messages are a problem and suggest some needed improvements to the methods packages. These are being worked on. + seth __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk error on Linux
I am having trouble getting tcltk package to load on openSuse 10.2 running R-devel. I have specifically put my /usr/share/tcl directory in my PATH, but R doesn't seem to see it. I also have installed tk on my system. Any ideas on what the problem is? Also, note that I have some warning messages on starting up R, not sure what they mean or if they are pertinent. Thanks, Mark Warning messages: 1: In .updateMethodsInTable(fdef, where, attach) : Couldn't find methods table for conditional, package Category may be out of date 2: In .updateMethodsInTable(fdef, where, attach) : Methods list for generic conditional not found require(tcltk) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system sessionInfo() R version 2.6.0 Under development (unstable) (2007-08-01 r42387) i686-pc-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] splines tools stats graphics grDevices utils datasets [8] methods base other attached packages: [1] affycoretools_1.9.3annaffy_1.9.1 xtable_1.5-0 [4] gcrma_2.9.1matchprobes_1.9.10 biomaRt_1.11.4 [7] RCurl_0.8-1XML_1.9-0 GOstats_2.3.8 [10] Category_2.3.19genefilter_1.15.9 survival_2.32 [13] KEGG_1.17.0RBGL_1.13.3annotate_1.15.3 [16] AnnotationDbi_0.0.88 RSQLite_0.6-0 DBI_0.2-3 [19] GO_1.17.0 limma_2.11.9 affy_1.15.7 [22] preprocessCore_0.99.12 affyio_1.5.6 Biobase_1.15.23 [25] graph_1.15.10 loaded via a namespace (and not attached): [1] cluster_1.11.7 rcompgen_0.1-15 -- --- Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, Mobile VoiceMail (317) 663-0513 Home (no voice mail please) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk crashing R after the (ab)use of tkwait
library(tcltk) tt - tktoplevel() done - tclVar(0) but - tkbutton(tt, text=OK, command=function() tclvalue(done) - 1) tkpack(but) tkwait.variable(done) works as fine as long as I click the OK. However, if I close the window (by clicking in the X), R enters into an infinite loop and there's no way of returning except by closing the R window. I have the same pbm with R 1.5.0 on Window XP Home SP2. I think it's doing what it's supposed to, ie. waiting for done==1, just that this never happens. I've stopped using tkwait.variable for just this reason, and use tkwait.window(tt). You have to be careful to recover the variables you need before closing the window, so the function attached to the 'OK' button should take care of that before calling tkdestroy. (See http://www.nabble.com/Dropdown-boxes-in-tcltk-and-R-tf3751327.html#a10603161) Variables can be created in .GlobalEnv with - which will be availble after the function exits. See also how Greg Snow uses a purpose-built environment in his 'TeachingDemos' package. Mike __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/tcltk-crashing-R-after-the-%28ab%29use-of-tkwait-tf3487962.html#a10821463 Sent from the R help mailing list archive at Nabble.com. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk support....
Rusers, library(Rcmdr) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system While installing R I run configure with configure --prefix=/bla/bla --with-tcltk make make install configure did not returned any errors. Hence, I assume that the the tcl/tk libraries have been found. installin.packages(tcltk) returns an error telling me that there is no package tcltk on CRAN. And indeed there no such package on CRAN. Whats wrong? Eryk [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk support....
tcltk must be installed on your system, it is not a R package. Which Linux are you using? W Eryk Wolski wrote: Rusers, library(Rcmdr) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system While installing R I run configure with configure --prefix=/bla/bla --with-tcltk make make install configure did not returned any errors. Hence, I assume that the the tcl/tk libraries have been found. installin.packages(tcltk) returns an error telling me that there is no package tcltk on CRAN. And indeed there no such package on CRAN. Whats wrong? Eryk [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk support....
To my excuse I can say that I would have expected configure to issue an error or warning. I am absolutely certain that there was a remark during configure... you probably just have overseen that. I did run it configure with --with-tcltk. But there was not a singel message which would point me to the fact that some packages on my system are missing. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk support....
I use ubuntu/kubuntu... I did not had the dev packages installed. The problem is no solved. To my excuse I can say that I would have expected configure to issue an error or warning. I did run it configure with --with-tcltk. But there was not a singel message which would point me to the fact that some packages on my system are missing. cheers Eryk On 4/26/07, Stefan Grosse [EMAIL PROTECTED] wrote: tcltk must be installed on your system, it is not a R package. Which Linux are you using? W Eryk Wolski wrote: Rusers, library(Rcmdr) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system While installing R I run configure with configure --prefix=/bla/bla --with-tcltk make make install configure did not returned any errors. Hence, I assume that the the tcl/tk libraries have been found. installin.packages(tcltk) returns an error telling me that there is no package tcltk on CRAN. And indeed there no such package on CRAN. Whats wrong? Eryk [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk support....
I just read another post so I know youre on (K)ubuntu: you need to install tcl8.4-dev and tk84-dev packages. If there is no tcl/tk R installs nevertheless but is stating that at the configuration that there is no tcl/tk support... so thats where you have to look at. Maybe it is better you install the deb package of 2.5.0 instead of compiling yourself... Stefan W Eryk Wolski wrote: Rusers, library(Rcmdr) Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system While installing R I run configure with configure --prefix=/bla/bla --with-tcltk make make install configure did not returned any errors. Hence, I assume that the the tcl/tk libraries have been found. installin.packages(tcltk) returns an error telling me that there is no package tcltk on CRAN. And indeed there no such package on CRAN. Whats wrong? Eryk [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk support....
Stefan Grosse wrote: To my excuse I can say that I would have expected configure to issue an error or warning. I am absolutely certain that there was a remark during configure... you probably just have overseen that. There's a whole sequence of them. Here's how it looks when succesful (Fedora) checking for tclConfig.sh... no checking for tclConfig.sh in library (sub)directories... /usr/lib/tclConfig.sh checking for tkConfig.sh... no checking for tkConfig.sh in library (sub)directories... /usr/lib/tkConfig.sh checking /usr/include/tcl8.4/generic/tcl.h usability... no checking /usr/include/tcl8.4/generic/tcl.h presence... no checking for /usr/include/tcl8.4/generic/tcl.h... no checking /usr/include/tcl8.4/tcl.h usability... no checking /usr/include/tcl8.4/tcl.h presence... no checking for /usr/include/tcl8.4/tcl.h... no checking /usr/include/tcl.h usability... yes checking /usr/include/tcl.h presence... yes checking for /usr/include/tcl.h... yes checking /usr/include/tk8.4/generic/tk.h usability... no checking /usr/include/tk8.4/generic/tk.h presence... no checking for /usr/include/tk8.4/generic/tk.h... no checking /usr/include/tk8.4/tk.h usability... no checking /usr/include/tk8.4/tk.h presence... no checking for /usr/include/tk8.4/tk.h... no checking /usr/include/tcl8.4/tk.h usability... no checking /usr/include/tcl8.4/tk.h presence... no checking for /usr/include/tcl8.4/tk.h... no checking /usr/include/tk.h usability... yes checking /usr/include/tk.h presence... yes checking for /usr/include/tk.h... yes checking whether compiling/linking Tcl/Tk code works... yes And at the end you should get: Interfaces supported: X11, tcltk but of course you need to check that tcltk is there... I did run it configure with --with-tcltk. But there was not a singel message which would point me to the fact that some packages on my system are missing. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk
Sorry, but this works under all the circumstances I tried on my Vista system, so there is nothing I can do to debug it. On Tue, 17 Apr 2007, Prof Brian Ripley wrote: I suspect tcl's own version of 'access', but can you please confirm that this still happens under 'Run as Administrator', assuming 'C:\Program' is a system area in Swedish Windows Vista? I will be able to take a closer look, but not before 2.5.0 (which is in code freeze and I have limited acccess to a Vista machine). On Tue, 17 Apr 2007, Sofia Wikström wrote: I have problems with Tcl/Tk in R 2.4.1, when running it on Windows Vista (see error message below). Regards, Sofia library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories: {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 This probably means that Tcl wasn't installed properly. Error: .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' _ Sofia Wikström, PhD AquaBiota Water Research Svante Arrhenius väg 21A, SE-104 05 Stockholm, Sweden Phone: (+46) 8 16 10 07 [EMAIL PROTECTED] -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk
Prof Brian Ripley wrote: Sorry, but this works under all the circumstances I tried on my Vista system, so there is nothing I can do to debug it. You (i.e. Sofia) could do some investigation yourself. It may prove informative if you search for init.tcl and check whether it is readable (for you as ordinary user). It is supposed to be a plain text file, so notepad/wordpad can read it. -p On Tue, 17 Apr 2007, Prof Brian Ripley wrote: I suspect tcl's own version of 'access', but can you please confirm that this still happens under 'Run as Administrator', assuming 'C:\Program' is a system area in Swedish Windows Vista? I will be able to take a closer look, but not before 2.5.0 (which is in code freeze and I have limited acccess to a Vista machine). On Tue, 17 Apr 2007, Sofia Wikström wrote: I have problems with Tcl/Tk in R 2.4.1, when running it on Windows Vista (see error message below). Regards, Sofia library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories: {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 This probably means that Tcl wasn't installed properly. Error: .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' _ Sofia Wikström, PhD AquaBiota Water Research Svante Arrhenius väg 21A, SE-104 05 Stockholm, Sweden Phone: (+46) 8 16 10 07 [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk
Thanks for the help! I found out that it was a problem with the search path for R. Reinstalling R seems to have solved the problem. Sorry for bothering you before having tested that. Sofia -Ursprungligt meddelande- Från: Peter Dalgaard [mailto:[EMAIL PROTECTED] Skickat: den 18 april 2007 16:11 Till: Prof Brian Ripley Kopia: Sofia Wikström; r-help@stat.math.ethz.ch Ämne: Re: [R] Tcltk Prof Brian Ripley wrote: Sorry, but this works under all the circumstances I tried on my Vista system, so there is nothing I can do to debug it. You (i.e. Sofia) could do some investigation yourself. It may prove informative if you search for init.tcl and check whether it is readable (for you as ordinary user). It is supposed to be a plain text file, so notepad/wordpad can read it. -p On Tue, 17 Apr 2007, Prof Brian Ripley wrote: I suspect tcl's own version of 'access', but can you please confirm that this still happens under 'Run as Administrator', assuming 'C:\Program' is a system area in Swedish Windows Vista? I will be able to take a closer look, but not before 2.5.0 (which is in code freeze and I have limited acccess to a Vista machine). On Tue, 17 Apr 2007, Sofia Wikström wrote: I have problems with Tcl/Tk in R 2.4.1, when running it on Windows Vista (see error message below). Regards, Sofia library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories: {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 This probably means that Tcl wasn't installed properly. Error: .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' _ Sofia Wikström, PhD AquaBiota Water Research Svante Arrhenius väg 21A, SE-104 05 Stockholm, Sweden Phone: (+46) 8 16 10 07 [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Tcltk
I have problems with Tcl/Tk in R 2.4.1, when running it on Windows Vista (see error message below). Regards, Sofia library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories: {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 This probably means that Tcl wasn't installed properly. Error: .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' _ Sofia Wikström, PhD AquaBiota Water Research Svante Arrhenius väg 21A, SE-104 05 Stockholm, Sweden Phone: (+46) 8 16 10 07 [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk
I suspect tcl's own version of 'access', but can you please confirm that this still happens under 'Run as Administrator', assuming 'C:\Program' is a system area in Swedish Windows Vista? I will be able to take a closer look, but not before 2.5.0 (which is in code freeze and I have limited acccess to a Vista machine). On Tue, 17 Apr 2007, Sofia Wikström wrote: I have problems with Tcl/Tk in R 2.4.1, when running it on Windows Vista (see error message below). Regards, Sofia library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable init.tcl in the following directories: {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} {C:\Program\R\R-2.4.1/Tcl/lib/tcl8.4} C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 C:/Program/R/R-2.4.1/Tcl/lib/tcl8.4 This probably means that Tcl wasn't installed properly. Error: .onLoad failed in 'loadNamespace' for 'tcltk' Error: package/namespace load failed for 'tcltk' _ Sofia Wikström, PhD AquaBiota Water Research Svante Arrhenius väg 21A, SE-104 05 Stockholm, Sweden Phone: (+46) 8 16 10 07 [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk, tclRequire and Tktable help
I know almost nothing about the tcltk library, and the documentation seems very poor. What's the meaning of this error, and is there any way to fix it? I'm running R 2.4.1 in a Windows XP machine where I have almost no privileges (but at home I am the Evil Overlord of a Linux machine...) library(tcltk) tclRequire(Tktable) # [1] FALSE # Warning message: # Tcl package 'Tktable' not found in: tclRequire(Tktable) Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk crashing R after the (ab)use of tkwait
Running this: library(tcltk) tt - tktoplevel() done - tclVar(0) but - tkbutton(tt, text=OK, command=function() tclvalue(done) - 1) tkpack(but) tkwait.variable(done) works as fine as long as I click the OK. However, if I close the window (by clicking in the X), R enters into an infinite loop and there's no way of returning except by closing the R window. Why? What am I doing wrong? Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk crashing R after the (ab)use of tkwait
Alberto Monteiro albmont at centroin.com.br writes: library(tcltk) tt - tktoplevel() done - tclVar(0) but - tkbutton(tt, text=OK, command=function() tclvalue(done) - 1) tkpack(but) tkwait.variable(done) works as fine as long as I click the OK. However, if I close the window (by clicking in the X), R enters into an infinite loop and there's no way of returning except by closing the R window. Works for me with R-2.4.1 on Windows 2000. So better tell us about the details of your operating system. Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk crashing R after the (ab)use of tkwait
Dieter Menne wrote: library(tcltk) tt - tktoplevel() done - tclVar(0) but - tkbutton(tt, text=OK, command=function() tclvalue(done) - 1) tkpack(but) tkwait.variable(done) works as fine as long as I click the OK. However, if I close the window (by clicking in the X), R enters into an infinite loop and there's no way of returning except by closing the R window. Works for me with R-2.4.1 on Windows 2000. So better tell us about the details of your operating system. R 2.4.1 on Windows XP. Should they work differently? Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk difficulties
Friends: I have a tcltk widget for inputting constants and other values that are needed by subsequent R functions. My widget works well. I have an OnOK function that does what I had hoped it would. Among other input items the widget also uses 6 radio buttons to select one of 6 choices. It functions as it should. Here is the problem: I would like one of the buttons to be the default and to be switched on when the widget is created so that the user will have some guidance. (Currently all 6 buttons are blank until one is selected.) I can't handle the job. I have Welch and Jones _Practical Programming in Tcl and Tk_ but would appreciate any help from fellow R users. Many thanks. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk difficulties
Charles Annis, P.E. [EMAIL PROTECTED] writes: Friends: I have a tcltk widget for inputting constants and other values that are needed by subsequent R functions. My widget works well. I have an OnOK function that does what I had hoped it would. Among other input items the widget also uses 6 radio buttons to select one of 6 choices. It functions as it should. Here is the problem: I would like one of the buttons to be the default and to be switched on when the widget is created so that the user will have some guidance. (Currently all 6 buttons are blank until one is selected.) I can't handle the job. I have Welch and Jones _Practical Programming in Tcl and Tk_ but would appreciate any help from fellow R users. library(tcltk) demo(tkdensity) # possibly: # options(pager=tkpager) file.show(system.file(demo/tkdensity.R,package=tcltk)) -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk difficulties
Thank you, Peter. The code provides a great example of packing the widget nicely too. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard Sent: Saturday, November 04, 2006 8:12 AM To: [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Subject: Re: [R] tcltk difficulties Charles Annis, P.E. [EMAIL PROTECTED] writes: Friends: I have a tcltk widget for inputting constants and other values that are needed by subsequent R functions. My widget works well. I have an OnOK function that does what I had hoped it would. Among other input items the widget also uses 6 radio buttons to select one of 6 choices. It functions as it should. Here is the problem: I would like one of the buttons to be the default and to be switched on when the widget is created so that the user will have some guidance. (Currently all 6 buttons are blank until one is selected.) I can't handle the job. I have Welch and Jones _Practical Programming in Tcl and Tk_ but would appreciate any help from fellow R users. library(tcltk) demo(tkdensity) # possibly: # options(pager=tkpager) file.show(system.file(demo/tkdensity.R,package=tcltk)) -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk: multiple listboxes, selection
Dear list, I have multiple (BWidget) listboxes in the same toplevel window. The problem is, if I select (by left clicking) on one of those listbox elements, the current selection in the *other* listboxes is cleared! Anybody knows how I can prevent this? Here's my code (sorry not complete): (E.g. If I select an X value, I'd lose the Y value I selected before) gui.create.tab.general - function(tt) { # Network topology frame.1 - tkframe(tt) combo_topology - tkwidget(frame.1, ComboBox, values = infras, editable = FALSE) tcl(combo_topology, setvalue, first) tkgrid(tklabel(frame.1, text=Network topology), combo_topology) tkgrid(frame.1, sticky = w) # X values frame.x - tkwidget(tt, labelframe, text = X value) tl.x - tklistbox(frame.x, height = length(xvals) / 2, width = 50, selectmode = browse, background = white) for(i in seq(from=1, to=length(xvals), by=2)) { tkinsert(tl.x, end, xvals[[i]]) } tkselection.set(tl.x, 0) tkgrid(tl.x, sticky=news) # Y values frame.y - tkwidget(tt, labelframe, text = Y value(s)) tl.y - tklistbox(frame.y, height = 20, #length(yvals) / yvals.field.count, yscrollcommand=function(...) tkset(scr.y,...), width = 50, selectmode = extended, background = white) scr.y - tkscrollbar(frame.y, repeatinterval = 5, command = function(...) tkyview(tl.y, ...)) for(i in seq(from=1, to=length(yvals), by=yvals.field.count)) { tkinsert(tl.y, end, yvals[[i]]) } tkselection.set(tl.y, 0) tkgrid(tl.y, scr.y, sticky=news) # Packing tkgrid(frame.x, frame.y, sticky=news) #side = left, fill = both, expand = TRUE) } __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk crashes with bad color with text widget
On 10/17/2006 8:36 AM, Peter Dalgaard wrote: Duncan Murdoch [EMAIL PROTECTED] writes: On 10/16/2006 10:47 PM, Alex Couture-Beil wrote: Hello I have been playing with tcl/tk in R 2.4.0 on windows XP and have managed to crash R by supplying tcl/tk with an incorrect color. Is this a bug? is there a way for me to test the color to see if it is a valid tcl/tk color, to avoid this? tt=tktoplevel() tklabel(parent=tt, text=hello world, foreground=reed) Error in structure(.External(dotTclObjv, objv, PACKAGE = tcltk), class = tclObj) : [tcl] unknown color name reed. An error is displayed as one would expect, however when I try tktext(parent=tt, foreground=blaaack) R crashes, rather than displaying an error as tklabel did. This, however, does not happen on my FreeBSD machine, which displays an error similar to the one for tklabel and does not crash. I see the same crash in Windows, occurring deep in one of the TCL routines, where it tries to work with a font, but the font has not been assigned. TK on Windows uses a different display driver than FreeBSD does, so this could be a TK bug, rather than an R bug, and it does look like that. Alternatively, we might be ignoring an error generated in TK, in which case it is our bug: but the tklabel example makes that sound wrong. To verify, it would be nice to try the same commands in wish (or some other TCL/TK platform). Do you know the pure TCL equivalent? Should be close to this toplevel .1 label .1.1 -text hello world -foreground reed text .1.2 -foreground blaack (and it doesn't crash on my machine, in R or wish) I only see the crash in R, not in wish. It happens when, in the midst of destroying the partially created text widget, TK needs to create the Windows window corresponding to it. Windows sends some messages to the newly created window (including WM_NCCREATE), these lead to TK servicing idle events, and one of those involves looking the incomplete text object, and that's when things crash. I don't know why wish can handle the error properly; maybe it just got lucky, or maybe it handles the error differently. I think I'm going to have to give up on this one. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk crashes with bad color with text widget
Hello I have been playing with tcl/tk in R 2.4.0 on windows XP and have managed to crash R by supplying tcl/tk with an incorrect color. Is this a bug? is there a way for me to test the color to see if it is a valid tcl/tk color, to avoid this? tt=tktoplevel() tklabel(parent=tt, text=hello world, foreground=reed) Error in structure(.External(dotTclObjv, objv, PACKAGE = tcltk), class = tclObj) : [tcl] unknown color name reed. An error is displayed as one would expect, however when I try tktext(parent=tt, foreground=blaaack) R crashes, rather than displaying an error as tklabel did. This, however, does not happen on my FreeBSD machine, which displays an error similar to the one for tklabel and does not crash. Thanks for any help, Alex Couture-Beil __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk problem
Hi, I'm using fedora core 3. I downloaded R and installed it. After that, I invoked R by the root user and write the command install.packages(Rcmdr, dependencies=TRUE). This command installs Rcmdr automatically. However, whenever I type library(Rcmdr), it tells me that Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error: package 'tcltk' could not be loaded tcl and tk are installed on my system The problem is that R can't find them as I guess Please help me to solve this problem __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk problem
On Wed, 20 Sep 2006, Dina Said wrote: Hi, I'm using fedora core 3. I downloaded R and installed it. After that, I invoked R by the root user and write the command install.packages(Rcmdr, dependencies=TRUE). This command installs Rcmdr automatically. However, whenever I type library(Rcmdr), it tells me that Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error: package 'tcltk' could not be loaded tcl and tk are installed on my system The problem is that R can't find them as I guess It is most likely that tcl and tk are installed, but tcl-devel and tk-devel are not. See the 'R Installation and Administation' manual. Please install these RPMs if necessary, then re-install R, keeping a note of the output from configure. (As far as I know this cannot happen if you installed the RPM, so am assuming that you built R from the sources: you omitted to tell us.) -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk command to figure out which widget is on focus (or clicked)
Hi, I'm making an interface, where a Tcl/Tk window have few listbox widgets. I need to select separate parameters from separate listboxes. It is clear how to get cursor selection value, once you know which listbox widget you clicked. The problem is I can't figure out which one tcltk command to use to get an information which listbox widget is in focus (or clicked). Thank you, Vlad __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk command to figure out which widget in active or in focus
Hi, I'm making an interface, where a Tcl/Tk window have few listbox widgets. I need to select separate parameters from separate listboxes. It is clear how to get cursor selection value, once you know which listbox widget you clicked. The problem is I can't figure out which one tcltk command to use to get an information which listbox widget I clicked. Thank you, Vlad __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk library on linux
R-users, Sorry for my English, I'm French. I want to use the Rcmdr package which depends on the tcltk library. I'm on Linux Ubuntu. I don't manage to use Rcmdr even if tcl and tk are installed. I'm a newbie in Linux and I don't know how to specify Configtcl.sh and Configtk.sh location to R (I saw that on the mailing list archive). I have installed all the packages tcl8.4, tcl8.4-dev, tk8.4, tk8.4-dev In R, in the ./configure script, there is 3 options to set the tcl.sh and tk.sh paths. But I don't know how to use it. I have also use the binaries distribution of R and it is always the same error : Loading Tcl/Tk interface ... Error in fun(...) : this isn't a Tk application unknown color name Black Error : .onLoad failed in 'loadNamespace' for 'tcltk' I have the same error when I write : Install.package() If someone could help me.. Thanks in advance. Yohan -- Ce message est confidentiel. Son contenu ne represente en aucun cas un engagement de la part du Groupe Soft Computing sous reserve de tout accord conclu par ecrit entre vous et le Groupe Soft Computing. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee prealablement. Si vous n'etes pas destinataire de ce message, merci d'en avertir immediatement l'expediteur. This message is confidential. Its content does not constitute a commitment by Soft Computing Group except where provided for in a written agreement between you and Soft Computing Group. Any unauthorised disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of this message, please notify the sender immediately. -- [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tcltk library on linux
On 10 August 2006 at 15:09, Yohan CHOUKROUN wrote: | I want to use the Rcmdr package which depends on the tcltk library. | | I'm on Linux Ubuntu. $ sudo apt-get install r-cran-rcmdr should be all you need thanks to all the work done on the Debian side. Amicalement, Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk package
On Tuesday 01 August 2006 19:24, John McHenry wrote: [...] Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available is 2.2.1. Oh, but there is... right on CRAN. For Dapper just add this line to your sources.list: deb http://cran.R-project.org/bin/linux/ubuntu/ dapper/ This repository has lots of other packages compiled for Ubuntu, feel free to take a look. HTH, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk package
Hi Adrian, Thanks for the tip. I re-installed and everything seems to work just fine. Thanks, Jack. Adrian DUSA [EMAIL PROTECTED] wrote: On Tuesday 01 August 2006 19:24, John McHenry wrote: [...] Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available is 2.2.1. Oh, but there is... right on CRAN. For Dapper just add this line to your sources.list: deb http://cran.R-project.org/bin/linux/ubuntu/ dapper/ This repository has lots of other packages compiled for Ubuntu, feel free to take a look. HTH, Adrian -- Adrian DUSA Romanian Social Data Archive 1, Schitu Magureanu Bd 050025 Bucharest sector 5 Romania Tel./Fax: +40 21 3126618 \ +40 21 3120210 / int.101 - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Tcltk package
Hi WizaRds, I ran into trouble trying to install the debug package, which requires TCL/TK support. It seems like the tcltk package is not installed on my system. From: http://tolstoy.newcastle.edu.au/R/help/05/07/7993.html it seems that the tcltk is bundled with the base R distribution. I'm running R under linux: version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day01 svn rev38247 language R version.string Version 2.3.1 (2006-06-01) tcl8.4 and tk8.4 are both installed. The messages I get when I try to install the debug package are: install.packages(debug) trying URL 'http://cran.us.r-project.org/src/contrib/debug_1.1.0.tar.gz' Content type 'application/x-tar' length 26492 bytes opened URL == downloaded 25Kb * Installing *source* package 'debug' ... ** R ** inst ** save image Loading required package: mvbutils MVBUTILS: no tasks vector found in ROOT Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error: package 'tcltk' could not be loaded Execution halted ERROR: execution of package source for 'debug' failed ** Removing '/usr/local/lib/R/library/debug' The downloaded packages are in /tmp/RtmpEocXcC/downloaded_packages Warning message: installation of package 'debug' had non-zero exit status in: install.packages(debug) Where am I going wrong? Thanks, Jack. - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk package
John McHenry [EMAIL PROTECTED] writes: Hi WizaRds, I ran into trouble trying to install the debug package, which requires TCL/TK support. It seems like the tcltk package is not installed on my system. From: http://tolstoy.newcastle.edu.au/R/help/05/07/7993.html it seems that the tcltk is bundled with the base R distribution. I'm running R under linux: version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day01 svn rev38247 language R version.string Version 2.3.1 (2006-06-01) tcl8.4 and tk8.4 are both installed. The messages I get when I try to install the debug package are: install.packages(debug) trying URL 'http://cran.us.r-project.org/src/contrib/debug_1.1.0.tar.gz' Content type 'application/x-tar' length 26492 bytes opened URL == downloaded 25Kb * Installing *source* package 'debug' ... ** R ** inst ** save image Loading required package: mvbutils MVBUTILS: no tasks vector found in ROOT Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error: package 'tcltk' could not be loaded Execution halted ERROR: execution of package source for 'debug' failed ** Removing '/usr/local/lib/R/library/debug' The downloaded packages are in /tmp/RtmpEocXcC/downloaded_packages Warning message: installation of package 'debug' had non-zero exit status in: install.packages(debug) Where am I going wrong? Did you build R yourself, and can you do library(tcltk) on R's command line? You may well be missing the -devel packages for tcl and tk. And, BTW, which Linux distribution is this? i686-pc-linux-gnu is not sufficient. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tcltk package
Hi Peter, Peter Dalgaard [EMAIL PROTECTED] wrote: Did you build R yourself, and can you do library(tcltk) on R's command line? Yes, I built R myself. I couldn't find a debian package for R 2.3.1. The latest available is 2.2.1. library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 'tcltk' You may well be missing the -devel packages for tcl and tk. I didn't get any warnings when I used configure. Do I need to explicitly configure for tcl and tk? And, BTW, which Linux distribution is this? i686-pc-linux-gnu is not sufficient. Ubuntu 6.06. Thanks, Jack. Peter Dalgaard [EMAIL PROTECTED] wrote: John McHenry writes: Hi WizaRds, I ran into trouble trying to install the debug package, which requires TCL/TK support. It seems like the tcltk package is not installed on my system. From: http://tolstoy.newcastle.edu.au/R/help/05/07/7993.html it seems that the tcltk is bundled with the base R distribution. I'm running R under linux: version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day01 svn rev38247 language R version.string Version 2.3.1 (2006-06-01) tcl8.4 and tk8.4 are both installed. The messages I get when I try to install the debug package are: install.packages(debug) trying URL 'http://cran.us.r-project.org/src/contrib/debug_1.1.0.tar.gz' Content type 'application/x-tar' length 26492 bytes opened URL == downloaded 25Kb * Installing *source* package 'debug' ... ** R ** inst ** save image Loading required package: mvbutils MVBUTILS: no tasks vector found in ROOT Loading required package: tcltk Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error: package 'tcltk' could not be loaded Execution halted ERROR: execution of package source for 'debug' failed ** Removing '/usr/local/lib/R/library/debug' The downloaded packages are in /tmp/RtmpEocXcC/downloaded_packages Warning message: installation of package 'debug' had non-zero exit status in: install.packages(debug) Where am I going wrong? Did you build R yourself, and can you do library(tcltk) on R's command line? You may well be missing the -devel packages for tcl and tk. And, BTW, which Linux distribution is this? i686-pc-linux-gnu is not sufficient. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tcltk: help pop-up
Hi all; Please, does anyone have a piece of R-tcltk code that includes a help pop-up for any item and could send it as an example? thanks and best regards, Javier -- Javier García-Pintado Institute of Earth Sciences Jaume Almera (CSIC) Lluis Sole Sabaris s/n, 08028 Barcelona Phone: +34 934095410 Fax: +34 934110012 e-mail:[EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Tcltk Default Background Color Question
On Sun, Jun 04, 2006 at 09:55:20PM -0700, Crimson Turquoise wrote: Hello, I am new at tcltk and would like to identify the default background color for widgets. I have found things like systemBackground or tk_setPalette, but am not able to get them to work in R. Is there a name for this color such as lightgray, etc? This works for me: tkcmd(tk_setPalette,gray93) # set am overall background color Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Tcltk Default Background Color Question
Hello, I am new at tcltk and would like to identify the default background color for widgets. I have found things like systemBackground or tk_setPalette, but am not able to get them to work in R. Is there a name for this color such as lightgray, etc? Thank you for your time. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk loading in R-2.2.1 from src
Hi, Having trouble loading tcltk in R 2.2.1 built from source. ./configure, make, make check, and make install run ok. library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 'tcltk' even though it is listed in library() output. I have the same problem even if i compile with options: ./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on this issue appreciated. running on linux (2.4.21-4) version: rpm -qa | grep tcl tcl-devel-8.3.5-92 tcl-8.3.5-92 Specifically, the package pbatR loads this library during installation. Thanks, Patrice -- Patrice Seyed Linux System Administrator - LinGA RHCE, SCSA Boston University Medical Campus __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk loading in R-2.2.1 from src
Patrice - I had a very similar problem using TCL/TK 8.3. Below is the email I sent to my computing group at work about how I fixed it. Note that since my TCL/TK header (.h) files were in an odd location, the first step probably isn't relevant for you. But I bet the second step is. -- I believe I have found the solution to this problem. There were 2 steps I took to get a build of R in my home directory that properly uses Tcl/Tk 8.3 under Linux. The first was setting an environment variable to let R know where the tcl.h and tk.h files reside. This environment variable was TCLTK_CPPFLAGS and is set to -I/s/include . This can bet set in the config.site in R's build directory also. (NOTE to R-help: The above is site specific to my location, /s is for software on the network.) Second, there is some problem with the way R interacts with the tkConfig.sh file in /s/lib (or wherever your .sh file is located). It comes from the following line in tkConfig.sh. TK_XINCLUDES='# no special path needed' The # character, indicating a comment, is somehow misinterpreted by the configure script which breaks the Tcl/Tk functionality. I was able to get around this by simply removing the comment and leaving it as TK_XINCLUDES='' That got me a working version of the newest R using Tcl/Tk. I'm not sure if Tcl/Tk version 8.4 would still put that comment in there, I believe it's changed though, so you'd only have to follow the first step to get R compiled with Tcl/Tk support. I found reference to this problem on the R mailing list, it appears to only affect certain installations of Tcl/Tk. - HTH, Erik Iverson Patrice Seyed wrote: Hi, Having trouble loading tcltk in R 2.2.1 built from source. ./configure, make, make check, and make install run ok. library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 'tcltk' even though it is listed in library() output. I have the same problem even if i compile with options: ./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on this issue appreciated. running on linux (2.4.21-4) version: rpm -qa | grep tcl tcl-devel-8.3.5-92 tcl-8.3.5-92 Specifically, the package pbatR loads this library during installation. Thanks, Patrice __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk loading in R-2.2.1 from src
Patrice Seyed [EMAIL PROTECTED] writes: Hi, Having trouble loading tcltk in R 2.2.1 built from source. ./configure, make, make check, and make install run ok. library(tcltk) Error in firstlib(which.lib.loc, package) : Tcl/Tk support is not available on this system Error in library(tcltk) : .First.lib failed for 'tcltk' even though it is listed in library() output. Well, the package is there, as a stub to tell you that it doesn't work I have the same problem even if i compile with options: ./configure --with-tcltk --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh In both cases, do check the configure output for clues. Is there a dep for R 2.2.1 on a specific version of tcl? Any hints on this issue appreciated. Anything later than 8.1 or so should work. Some old versions had bugs in tclConfig.sh/tkConfig.sh which didn't quite give out enough info to tell configure where to find the include files and libraries. I'm not quite sure when that was, but we're up to 8.4.9 now and tcl/tk has a notoriously slow release cycle, so 8.3.5 sound quite ancient running on linux (2.4.21-4) version: Of which distribution? rpm -qa | grep tcl tcl-devel-8.3.5-92 tcl-8.3.5-92 and rpm -qa | grep tk says what? -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk error when calling a dialog
Hello; I've got several radiobuttons in tcltk with the following sintaxis: tk2.rd - /tkradiobutton(/frame4,command=plotDialog1,text=New Q plot, value=2, variable=OUTPLOTtclVar/)/ All the buttons call the same function plotDialog1. With the objective of call a dialog to select some plotting options. When I select one of the radiobuttons and the windows with the plotting options appears. It appears blank, and I obtain this message of error in R: Error in structure(.External(dotTclObjv, objv, PACKAGE = tcltk), class = tclObj) : [tcl] grab failed: window not viewable. All radio buttons are within a frame in a window named dlg. I've removed nearly everything in this function and I still obtain the same error when clicking on a radiobutton. Even with this very simple remaining code: plotDialog1 - function/()/ { mddlg2 - /tktoplevel()/ tkwm./deiconify(/mddlg2/)/ tkgrab./set(/mddlg2/)/ tkwm./title(/mddlg2,Plot options/)/ onNO - function/()/ { tkgrab./release(/mddlg2/)/ /tkdestroy(/mddlg2/)/ /tkfocus(/dlg/)/ } // NO.but - /tkbutton(/mddlg2,text= Cancel ,command=onNO/)/ /tkgrid(/NO.but,pady=2/)/ /tkfocus(/mddlg2/)/ tkwait./window(/mddlg2/)/ } Please for those who are used to utilize the tcltk library: ¿Can you see a clear error in this? I'm new to this library and tcltk and I'm unable to find out the error. Thanks and best regards, Javier [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] TclTk library loading (whole version) Linux
Hello; Well, I'm afraid this is the second related problem I report in two days (I'm sorry for this) I've programmed a tcltk interface for a model and it includes a comboBox. The comboBox widget comes with the BWidgets library of Tcl/Tk. It works all perfectly with the windows R GUI (with the help of Prof. B. Ripley), following the advices in ?Startup, but I would like that it also could work under Linux. I've got a complete TclTk8.4 installed and also BWidgets, and I could swear that the complete Tcl libraries could be loaded at least once, because I saw a message like Tcl 1.7 or similar under R. Now I don't receive the message anymore and it cannot find BWidgets under R. So I'm not even sure that I'm loading the whole tclTk Library anymore(instead of the subset that comes along with R) I've got libtcl8.4.so and libtk8.4.so in /usr/lib My .Renviron file contains: MY_TCLTK=yes TCL_LIBRARY=/usr/lib/tcl8.4 an in my R session: -- Sys.getenv(MY_TCLTK) MY_TCLTK yes Sys.getenv(TCL_LIBRARY) TCL_LIBRARY /usr/lib/tcl8.4 tclRequire(BWidgets) [1] FALSE Warning message: Tcl package 'BWidgets' not found in: tclRequire(BWidgets) - Please, some how uses BWidgets could tell if I'm doing something wrong in these steps? I've just installed ESS (Emacs Speaks Statistics), could this be a source of problem? Thanks to all, and best regards Javier - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] TclTk library loading (whole version) Linux
javier garcia-pintado [EMAIL PROTECTED] writes: Hello; Well, I'm afraid this is the second related problem I report in two days (I'm sorry for this) I've programmed a tcltk interface for a model and it includes a comboBox. The comboBox widget comes with the BWidgets library of Tcl/Tk. It works all perfectly with the windows R GUI (with the help of Prof. B. Ripley), following the advices in ?Startup, but I would like that it also could work under Linux. I've got a complete TclTk8.4 installed and also BWidgets, and I could swear that the complete Tcl libraries could be loaded at least once, because I saw a message like Tcl 1.7 or similar under R. Now I don't receive the message anymore and it cannot find BWidgets under R. So I'm not even sure that I'm loading the whole tclTk Library anymore(instead of the subset that comes along with R) I've got libtcl8.4.so and libtk8.4.so in /usr/lib My .Renviron file contains: MY_TCLTK=yes TCL_LIBRARY=/usr/lib/tcl8.4 an in my R session: -- Sys.getenv(MY_TCLTK) MY_TCLTK yes Sys.getenv(TCL_LIBRARY) TCL_LIBRARY /usr/lib/tcl8.4 tclRequire(BWidgets) [1] FALSE Warning message: Tcl package 'BWidgets' not found in: tclRequire(BWidgets) - Please, some how uses BWidgets could tell if I'm doing something wrong in these steps? I've just installed ESS (Emacs Speaks Statistics), could this be a source of problem? Thanks to all, and best regards Javier Another Javier (pez-de-Lacalle) has been messing with similar issues for the uroot package it seems. There is some stuff in the README file that might be useful. He has tclRequire(BWidget) (no s)... -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk package problems (R 2.2.0, SuSE 10)
i also had a problem getting 2.2.0 to work with tcltk on SuSE 10.0... and with compiling R from source on SuSE 10.0. on getting tcltk to work: i ended up taking source for tcl and tk from http://www.tcl.tk/software/tcltk/ and recompiling; once you unpack the tar.gz the install instructions are in the directory /unix for both programs. after that then capabilities() shows tcltk is TRUE and it works fine. i'm not sure if this was the easiest solution, but it worked. on getting SuSE 10 to compile R from source: i was unable to use Yast to get a fortran compiler and ended up recompiling gcc to include gfortran from the source (at e.g. http://gcc.fyxm.net/releases/gcc-4.0.2/ ) if you want some more detailed instructions feel free to mail me. best regards and good luck. Katharine Mullen Department of Physics and Astronomy Faculty of Sciences Vrije Universiteit de Boelelaan 1081 1081 HV Amsterdam The Netherlands room: T.1.06 tel: +31 205987870 fax: +31 205987992 e-mail: [EMAIL PROTECTED] http://www.nat.vu.nl/~kate/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk package problems (R 2.2.0, SuSE 10)
Hi I installed R 2.2.0 from source and I have the packages for tcl and tk installed on my system, but the package tcltk says, when I try to load the library tcltk: Tcl/Tk support is not available on this system. Are there any settings / variables which I have to set so that R recognises that Tcl/Tk support is installed on the system? Rainer -- NEW TELEPHONE NUMBER Tel:+27 - (0)72 808 2975 (w) Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa Tel:+27 - (0)72 808 2975 (w) Fax:+27 - (0)21 808 3304 Cell: +27 - (0)83 9479 042 email: [EMAIL PROTECTED] [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk, X11 protocol error: Bug?
Dear Nicholas, This problem has been reported before (enter X11 protocol error on the R site search at http://finzi.psych.upenn.edu/search.html to see the previous threads), but as far as I know, there's no definitive explanation or solution. As well, things appear to work fine, despite the warnings. The way I handle the problem in the Rcmdr package is simply to intercept the warnings. I hope this helps, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholas Lewin-Koh Sent: Monday, September 05, 2005 5:16 PM To: [EMAIL PROTECTED] Subject: [R] tcltk, X11 protocol error: Bug? Hi, I am having trouble debugging this one. The code is attached below, but it seems to be a problem at the C-tk interface. If I run this 1 time there are no problems if I run it more than once I start to get warnings that increase in multiples of 11 everytime I run it. Here is a sample session source(clrramp2.r) Loading required package: tcltk Loading Tcl/Tk interface ... done clrRamp() tt-clrRamp() tt function (n) { x - ramp(seq(0, 1, length = n)) rgb(x[, 1], x[, 2], x[, 3], max = 255) } environment: 0x8b8674c image(matrix(1:10),col=tt(10)) tt-clrRamp() There were 22 warnings (use warnings() to see them) image(matrix(1:10),col=tt(10)) There were 11 warnings (use warnings() to see them) warnings() Warning messages: 1: X11 protocol error: BadWindow (invalid Window parameter) 2: X11 protocol error: BadWindow (invalid Window parameter) 3: X11 protocol error: BadWindow (invalid Window parameter) 4: X11 protocol error: BadWindow (invalid Window parameter) 5: X11 protocol error: BadWindow (invalid Window parameter) 6: X11 protocol error: BadWindow (invalid Window parameter) 7: X11 protocol error: BadWindow (invalid Window parameter) 8: X11 protocol error: BadWindow (invalid Window parameter) 9: X11 protocol error: BadWindow (invalid Window parameter) 10: X11 protocol error: BadWindow (invalid Window parameter) 11: X11 protocol error: BadWindow (invalid Window parameter) I am running R-2.1.1 on ubuntu linux 5.04, compiled from source (not the deb package). My version of tcl/tk is 8.4. The code is below. If anyone sees something I am doing foolish let me know, otherwise I will file a bug report. Nicholas # File clrramp2.r ## require(tcltk) clrRamp - function(n.col, b.color=NULL,e.color=NULL){ B.ChangeColor - function() { b.color - tclvalue(tkcmd(tk_chooseColor,initialcolor=e.color, title=Choose a color)) if (nchar(b.color)0){ tkconfigure(canvas.b,bg=b.color) Rmp.Draw() } } E.ChangeColor - function() { e.color - tclvalue(tkcmd(tk_chooseColor,initialcolor=e.color, title=Choose a color)) ##cat(e.color) if (nchar(e.color)0){ tkconfigure(canvas.e,bg=e.color) Rmp.Draw() } } Rmp.Draw -function(){ cr-colorRampPalette(c(b.color,e.color),space=Lab,interpola te=spline) rmpcol - cr(n.col) #rmpcol-rgb( rmpcol[,1],rmpcol[,2],rmpcol[,3]) inc - 300/n.col xl - 0 for(i in 1:n.col){ ##item - tkitemconfigure(canvas.r,barlst[[i]],fill=rmpcol[i],outline=rmpcol[i]) #xl - xl+inc } } save.ramp - function(){ cr-colorRampPalette(c(b.color,e.color),space=Lab,interpola te=spline) tkdestroy(tt) ##invisible(cr) } tt - tktoplevel() tkwm.title(tt,Color Ramp Tool) frame - tkframe(tt) bframe - tkframe(frame,relief=groove,borderwidth=1) if(is.null(b.color)) b.color - blue if(is.null(e.color)) e.color - yellow if(missing(n.col)) n.col - 100 canvas.b - tkcanvas(bframe,width=50,height=25,bg=b.color) canvas.e - tkcanvas(bframe,width=50,height=25,bg=e.color) canvas.r - tkcanvas(tt,width=300,height=50,bg=white) BColor.button - tkbutton(bframe,text=Begin Color,command=B.ChangeColor) ##tkgrid(canvas.b,BColor.button) EColor.button - tkbutton(bframe,text=End Color,command=E.ChangeColor) killbutton - tkbutton(bframe,text=Save,command=save.ramp) tkgrid(canvas.b,BColor.button,canvas.e,EColor.button) tkgrid(bframe) tkgrid(frame) tkgrid(canvas.r) tkgrid(killbutton) cr-colorRampPalette(c(b.color,e.color),space=Lab,interpolat e=spline) ##rmpcol - hex(mixcolor(alpha,bc,ec,where=LUV)) rmpcol - cr(n.col) inc - 300/n.col xl - 0 #barlst - vector(length=n.col,mode=list) barlst - tclArray() for(i in 1:n.col){ item-tkcreate(canvas.r,rect,xl,0,xl+inc,50, fill=rmpcol[i],outline=rmpcol[i]) ##tkaddtag(canvas.r, point, withtag, item
[R] tcltk, X11 protocol error: Bug?
Hi, I am having trouble debugging this one. The code is attached below, but it seems to be a problem at the C-tk interface. If I run this 1 time there are no problems if I run it more than once I start to get warnings that increase in multiples of 11 everytime I run it. Here is a sample session source(clrramp2.r) Loading required package: tcltk Loading Tcl/Tk interface ... done clrRamp() tt-clrRamp() tt function (n) { x - ramp(seq(0, 1, length = n)) rgb(x[, 1], x[, 2], x[, 3], max = 255) } environment: 0x8b8674c image(matrix(1:10),col=tt(10)) tt-clrRamp() There were 22 warnings (use warnings() to see them) image(matrix(1:10),col=tt(10)) There were 11 warnings (use warnings() to see them) warnings() Warning messages: 1: X11 protocol error: BadWindow (invalid Window parameter) 2: X11 protocol error: BadWindow (invalid Window parameter) 3: X11 protocol error: BadWindow (invalid Window parameter) 4: X11 protocol error: BadWindow (invalid Window parameter) 5: X11 protocol error: BadWindow (invalid Window parameter) 6: X11 protocol error: BadWindow (invalid Window parameter) 7: X11 protocol error: BadWindow (invalid Window parameter) 8: X11 protocol error: BadWindow (invalid Window parameter) 9: X11 protocol error: BadWindow (invalid Window parameter) 10: X11 protocol error: BadWindow (invalid Window parameter) 11: X11 protocol error: BadWindow (invalid Window parameter) I am running R-2.1.1 on ubuntu linux 5.04, compiled from source (not the deb package). My version of tcl/tk is 8.4. The code is below. If anyone sees something I am doing foolish let me know, otherwise I will file a bug report. Nicholas # File clrramp2.r ## require(tcltk) clrRamp - function(n.col, b.color=NULL,e.color=NULL){ B.ChangeColor - function() { b.color - tclvalue(tkcmd(tk_chooseColor,initialcolor=e.color, title=Choose a color)) if (nchar(b.color)0){ tkconfigure(canvas.b,bg=b.color) Rmp.Draw() } } E.ChangeColor - function() { e.color - tclvalue(tkcmd(tk_chooseColor,initialcolor=e.color, title=Choose a color)) ##cat(e.color) if (nchar(e.color)0){ tkconfigure(canvas.e,bg=e.color) Rmp.Draw() } } Rmp.Draw -function(){ cr-colorRampPalette(c(b.color,e.color),space=Lab,interpolate=spline) rmpcol - cr(n.col) #rmpcol-rgb( rmpcol[,1],rmpcol[,2],rmpcol[,3]) inc - 300/n.col xl - 0 for(i in 1:n.col){ ##item - tkitemconfigure(canvas.r,barlst[[i]],fill=rmpcol[i],outline=rmpcol[i]) #xl - xl+inc } } save.ramp - function(){ cr-colorRampPalette(c(b.color,e.color),space=Lab,interpolate=spline) tkdestroy(tt) ##invisible(cr) } tt - tktoplevel() tkwm.title(tt,Color Ramp Tool) frame - tkframe(tt) bframe - tkframe(frame,relief=groove,borderwidth=1) if(is.null(b.color)) b.color - blue if(is.null(e.color)) e.color - yellow if(missing(n.col)) n.col - 100 canvas.b - tkcanvas(bframe,width=50,height=25,bg=b.color) canvas.e - tkcanvas(bframe,width=50,height=25,bg=e.color) canvas.r - tkcanvas(tt,width=300,height=50,bg=white) BColor.button - tkbutton(bframe,text=Begin Color,command=B.ChangeColor) ##tkgrid(canvas.b,BColor.button) EColor.button - tkbutton(bframe,text=End Color,command=E.ChangeColor) killbutton - tkbutton(bframe,text=Save,command=save.ramp) tkgrid(canvas.b,BColor.button,canvas.e,EColor.button) tkgrid(bframe) tkgrid(frame) tkgrid(canvas.r) tkgrid(killbutton) cr-colorRampPalette(c(b.color,e.color),space=Lab,interpolate=spline) ##rmpcol - hex(mixcolor(alpha,bc,ec,where=LUV)) rmpcol - cr(n.col) inc - 300/n.col xl - 0 #barlst - vector(length=n.col,mode=list) barlst - tclArray() for(i in 1:n.col){ item-tkcreate(canvas.r,rect,xl,0,xl+inc,50, fill=rmpcol[i],outline=rmpcol[i]) ##tkaddtag(canvas.r, point, withtag, item) barlst[[i]]-item xl - xl+inc } tkgrab.set(tt) tkwait.window(tt) ##tkdestroy(tt) invisible(cr) } __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk - automatically moving cursor to last line of tktext box - how?
Hi; I have a program which writes lines to a tktext box (of height, say, 10) with tkinsert(txto, end, paste(so,\n)) I would like my program to be such that it automatically scrolls down through the text box when it is full so that I always see the last 10 lines written. Can anyone help on this? Best regards Søren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk - automatically moving cursor to last line of tktext box - how?
Søren Højsgaard [EMAIL PROTECTED] writes: Hi; I have a program which writes lines to a tktext box (of height, say, 10) with tkinsert(txto, end, paste(so,\n)) I would like my program to be such that it automatically scrolls down through the text box when it is full so that I always see the last 10 lines written. Can anyone help on this? Best regards Søren How about tksee(txto, end) or maybe tkyview(txto, end - 10 lines) -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk programming guide
Dear List, I'm looking for some documentation about the R tcltk package The one I found in the help doesn't look exaustive, I need information on the use of the single tk widget, maybe with some examples thank you, simone gabbriellini __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk programming guide
Go to http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/. There are good examples. X-Original-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch Mime-Version: 1.0 (Apple Message framework v733) To: R-help@stat.math.ethz.ch From: Simone Gabbriellini [EMAIL PROTECTED] Date: Thu, 11 Aug 2005 14:04:58 +0200 Subject: [R] tcltk programming guide X-BeenThere: r-help@stat.math.ethz.ch X-Mailman-Version: 2.1.6 List-Id: Main R Mailing List: Primary help r-help.stat.math.ethz.ch List-Unsubscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] List-Archive: https://stat.ethz.ch/pipermail/r-help List-Post: mailto:r-help@stat.math.ethz.ch List-Help: mailto:[EMAIL PROTECTED] List-Subscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pascal.dfci.harvard.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.1 Dear List, I'm looking for some documentation about the R tcltk package The one I found in the help doesn't look exaustive, I need information on the use of the single tk widget, maybe with some examples thank you, simone gabbriellini __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Jianhua Zhang Department of Medical Oncology Dana-Farber Cancer Institute 44 Binney Street Boston, MA 02115-6084 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk programming guide
thank you, I knew that link, but I need something more document- oriented, more specific, i.e. if I want to know how to use tkadd, where should I look? or tkinsert and so on... thanx, simone Il giorno 11/ago/05, alle ore 14:18, John Zhang ha scritto: Go to http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/. There are good examples. X-Original-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch Mime-Version: 1.0 (Apple Message framework v733) To: R-help@stat.math.ethz.ch From: Simone Gabbriellini [EMAIL PROTECTED] Date: Thu, 11 Aug 2005 14:04:58 +0200 Subject: [R] tcltk programming guide X-BeenThere: r-help@stat.math.ethz.ch X-Mailman-Version: 2.1.6 List-Id: Main R Mailing List: Primary help r- help.stat.math.ethz.ch List-Unsubscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] List-Archive: https://stat.ethz.ch/pipermail/r-help List-Post: mailto:r-help@stat.math.ethz.ch List-Help: mailto:[EMAIL PROTECTED] List-Subscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pascal.dfci.harvard.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.1 Dear List, I'm looking for some documentation about the R tcltk package The one I found in the help doesn't look exaustive, I need information on the use of the single tk widget, maybe with some examples thank you, simone gabbriellini __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html Jianhua Zhang Department of Medical Oncology Dana-Farber Cancer Institute 44 Binney Street Boston, MA 02115-6084 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk programming guide
Dear Simone, tcltk functions correspond closely to Tcl and Tk commands, so documentation for the latter, available at http://wiki.tcl.tk/3109, is helpful. I also found Welsch's Practical Programming in Tcl and Tk useful. I expect that you've already seen Peter Dalgaard's two R News articles on the tcltk package. I hope this helps, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simone Gabbriellini Sent: Thursday, August 11, 2005 9:43 AM To: John Zhang Cc: R-help@stat.math.ethz.ch Subject: Re: [R] tcltk programming guide thank you, I knew that link, but I need something more document- oriented, more specific, i.e. if I want to know how to use tkadd, where should I look? or tkinsert and so on... thanx, simone Il giorno 11/ago/05, alle ore 14:18, John Zhang ha scritto: Go to http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/. There are good examples. X-Original-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch Mime-Version: 1.0 (Apple Message framework v733) To: R-help@stat.math.ethz.ch From: Simone Gabbriellini [EMAIL PROTECTED] Date: Thu, 11 Aug 2005 14:04:58 +0200 Subject: [R] tcltk programming guide X-BeenThere: r-help@stat.math.ethz.ch X-Mailman-Version: 2.1.6 List-Id: Main R Mailing List: Primary help r- help.stat.math.ethz.ch List-Unsubscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] List-Archive: https://stat.ethz.ch/pipermail/r-help List-Post: mailto:r-help@stat.math.ethz.ch List-Help: mailto:[EMAIL PROTECTED] List-Subscribe: https://stat.ethz.ch/mailman/listinfo/r-help, mailto:[EMAIL PROTECTED] Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pascal.dfci.harvard.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.1 Dear List, I'm looking for some documentation about the R tcltk package The one I found in the help doesn't look exaustive, I need information on the use of the single tk widget, maybe with some examples thank you, simone gabbriellini __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html Jianhua Zhang Department of Medical Oncology Dana-Farber Cancer Institute 44 Binney Street Boston, MA 02115-6084 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk package
Hi all, I have a package depending on the tcltk-package. However, I see that this package has been disappeared... Is there a reason why package 'tcltk' is not available anymore? Or is it replaced by another one? thx, Kurt. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk package
It's included in the base R distribution, I believe. Andy From: Kurt Sys Hi all, I have a package depending on the tcltk-package. However, I see that this package has been disappeared... Is there a reason why package 'tcltk' is not available anymore? Or is it replaced by another one? thx, Kurt. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk package
How do you know that it has disappeared? -roger Kurt Sys wrote: Hi all, I have a package depending on the tcltk-package. However, I see that this package has been disappeared... Is there a reason why package 'tcltk' is not available anymore? Or is it replaced by another one? thx, Kurt. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Roger D. Peng http://www.biostat.jhsph.edu/~rpeng/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk package [SOLVED]
I had R 2.0.1... It's not included in that distribution of R. It's ok in distribution 2.1.1. thx (to all that've been replying that it's included in the base distribution), Kurt. Liaw, Andy wrote: It's included in the base R distribution, I believe. Andy From: Kurt Sys Hi all, I have a package depending on the tcltk-package. However, I see that this package has been disappeared... Is there a reason why package 'tcltk' is not available anymore? Or is it replaced by another one? thx, Kurt. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk package [SOLVED]
Kurt == Kurt Sys [EMAIL PROTECTED] on Thu, 07 Jul 2005 15:07:52 +0200 writes: Kurt I had R 2.0.1... It's not included in that distribution of R. That's not correct. The tcltk package has been part of R for a very long time. The question is where you got the version of 'R 2.0.1' from that you mentioned. It must have been built by someone who didn't know how to make tcltk work ((and the R Installation Administration Manual tells you about this)) Kurt It's ok in distribution 2.1.1. i.e., in the one you got. Note that it is really a matter of properly building R ... see above. Martin Kurt thx (to all that've been replying that it's included in the base Kurt distribution), Kurt Kurt. Kurt Liaw, Andy wrote: It's included in the base R distribution, I believe. Andy From: Kurt Sys Hi all, I have a package depending on the tcltk-package. However, I see that this package has been disappeared... Is there a reason why package 'tcltk' is not available anymore? Or is it replaced by another one? thx, Kurt. Kurt __ Kurt R-help@stat.math.ethz.ch mailing list Kurt https://stat.ethz.ch/mailman/listinfo/r-help Kurt PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Kurt !DSPAM:42cd2d5784811931259031! __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk problem
Hi all, I have R Version 2.1.0 installed on a box running Redhat Fedora Core 2. When I try: library() it shows the package tcltk. But if I try: library(tcltk) I get the same error message like in this thread: http://tolstoy.newcastle.edu.au/R/help/01c/3418.html The same, tcl and tk are installed in /usr/lib; if I try: capabilities(tcltk) I get: tcltk FALSE I cant' find tcltk.so Any suggestions please? Thx in advance and Merry Xmas! Liviu __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk problem
On Thu, 2004-12-23 at 11:32 -0500, Liviu M Vladutu wrote: Hi all, I have R Version 2.1.0 installed on a box running Redhat Fedora Core 2. Are you really running 2.1.0 (which is an unreleased development version) or are you running 2.0.1, which is the present released version? What does the banner indicate when you first start R? How did you install R (compile from source or use one of Martyn's RPMS)? Also, please run the following command from a console and post the results back: rpm -q tcl tcl-devel When I try: library() it shows the package tcltk. But if I try: library(tcltk) I get the same error message like in this thread: http://tolstoy.newcastle.edu.au/R/help/01c/3418.html The same, tcl and tk are installed in /usr/lib; if I try: capabilities(tcltk) I get: tcltk FALSE As is indicated in the above post you referenced, this suggests that you compiled from source, but R did not locate the requisite files during the configure process. I cant' find tcltk.so Run the following command in a console and post the results back: locate tcltk.so Any suggestions please? Thx in advance and Merry Xmas! Liviu Please provide the above information and we can help further. Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk problem
On Thu, 2004-12-23 at 11:32 -0600, Marc Schwartz wrote: On Thu, 2004-12-23 at 11:32 -0500, Liviu M Vladutu wrote: Hi all, I have R Version 2.1.0 installed on a box running Redhat Fedora Core 2. Are you really running 2.1.0 (which is an unreleased development version) or are you running 2.0.1, which is the present released version? What does the banner indicate when you first start R? As a quick follow up here, this thread has been moved to r-devel under the same subject as Liviu confirmed that 2.1.0 is indeed what was installed. Marc __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] how to use chinese font in R/tcltk
I can use Chinese fonts in R. I can also use Chinese fonts in tcl/tk. But I can not write Chinese using tkgrid in R. The attached file is an example trying to write Chinese. The Chinese font can not be displayed correctly. Can anyone help me ? Sincerely library(tcltk) tkt.test-tktoplevel() heading - tklabel(tkt.test, text=Input Data File) row1.name - tklabel(tkt.test, text= following is chinese ÀÉ®×) row2.name - tklabel(tkt.test, text=File2) row1.entry - tkentry(tkt.test, width=30) row2.entry - tkentry(tkt.test, width=20) tkgrid(heading,columnspan=2) tkgrid(row1.name, row1.entry) tkgrid(row2.name, row2.entry) tkgrid.configure(row1.entry, row2.entry, sticky=w) tkgrid.configure(row1.name, row2.name, sticky=e) # row.entry = variable file1.name-tclVar() tkconfigure(row1.entry, textvariable=file1.name) file2.name-tclVar() tkconfigure(row2.entry, textvariable=file2.name) # get the filenames # tclvalue(file1.name) # tclvalue(file2.name) # we can put the entry content to the window # tclvalue(file1.name)-aa flag-tkbutton(tkt.test, text=OK, command=function() tkdestroy(tkt.test)) #flag-tkbutton(tkt.test, text=OK) #flag-tkbutton(tkt.test, text=OK, command=tkdestroy(tkt.test)) # must use command=function() tkdestroy(tkt.test), # cannot use command=tkdestroy(tkt.test) tkgrid(flag) #next.step - function(){ ##cat(OW!\n) ##tkconfigure(flag, text=receive successful) #tkdestroy(tkt.test) #} #tkconfigure(flag,command=next.step)__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] tcltk: repeat event while button is down?
Is there a way in TCL/TK to trigger an event multiple times while a button is held down? I'd like to have an rgl scene continuously rotate until the button is released. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk: repeat event while button is down?
Duncan Murdoch [EMAIL PROTECTED] writes: Is there a way in TCL/TK to trigger an event multiple times while a button is held down? I'd like to have an rgl scene continuously rotate until the button is released. Something involving after, I'd say. Set up the rotate action to reschedule itself after N milliseconds, and the button release event to after cancel. Or, perhaps safer, set a flag and condition the after command on it. I.e. something like doit - function() if(flag){rotate(); tkcmd(after,5,doit)} on button press, flag - TRUE ; doit() and on button release flag - FALSE That method has the drawback that one rotate() will occur after the button release. The first suggestion would amount to doit - function() {rotate(); ID - tkcmd(after,5,doit)} and then on button press (watch the scoping issues) ID - doit() and on release tkcmd(after,cancel,ID) which I think does work in pure Tcl, but I suspect that it in the Windows implementation of R-Tcl can cause race conditions so that the ID variable is outdated when the cancel takes place (Tcl guarantees that scripts execute atomically; as it turns out, for good reasons...). -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk: repeat event while button is down?
On 05 Aug 2004 22:55:10 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote : Duncan Murdoch [EMAIL PROTECTED] writes: Is there a way in TCL/TK to trigger an event multiple times while a button is held down? I'd like to have an rgl scene continuously rotate until the button is released. Something involving after, I'd say. Set up the rotate action to reschedule itself after N milliseconds, and the button release event to after cancel. Thanks. Just one more detail: the docs I have must be old, they don't talk about separate button press and button release events. How do I attach separate event handlers to those? Duncan __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk: repeat event while button is down?
Duncan Murdoch [EMAIL PROTECTED] writes: On 05 Aug 2004 22:55:10 +0200, Peter Dalgaard [EMAIL PROTECTED] wrote : Duncan Murdoch [EMAIL PROTECTED] writes: Is there a way in TCL/TK to trigger an event multiple times while a button is held down? I'd like to have an rgl scene continuously rotate until the button is released. Something involving after, I'd say. Set up the rotate action to reschedule itself after N milliseconds, and the button release event to after cancel. Thanks. Just one more detail: the docs I have must be old, they don't talk about separate button press and button release events. How do I attach separate event handlers to those? ButtonPress-1 (or just 1), ButtonRelease-1, I believe. It's used in the tkcanvas demo. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] tcltk problem with Button-2
Gabor Grothendieck [EMAIL PROTECTED] writes: But if I simply replace Control-Button-1 with Button-2 in the tkbind command, i.e. the last line, then nothing happens when I press Button-2 (which I assume is the right mouse button). It's the middle button (Tk was designed for three-button mice). The right button is Button-3. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] tcltk problem with Button-2
The following R code works as expected: require( tcltk ) tt - tktoplevel() # create a button labelled A that changes to B when pressed pressed - function() tkconfigure( tt.but, text=B ) tt.but - tkbutton( tt, text=A, command=pressed ) tkpack(tt.but) # if Control-Button-1 pressed change button label to C e - expression( tkconfigure( tt.but, text=C ), break ) tkbind(tt.but, Control-Button-1, e ) But if I simply replace Control-Button-1 with Button-2 in the tkbind command, i.e. the last line, then nothing happens when I press Button-2 (which I assume is the right mouse button). I also tried removing the break and using a function instead of an expression but it also does not respond, i.e. I tried replacing the last line with: tkbind(tt.but, Button-2, function() tkconfigure( tt.but, text=C ) ) I am using Windows 2000 and R 1.8.1 and am pasting the script into Rterm to make sure that the Rgui does not interfere with it. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] tcltk - tkcreate question
Hello, i'm trying to translate following tcltk source code, which I found in newsgroup comp.lang.tcl, written by Tom Wilkason, into R Code. proc scrolled_Canvas {base} { frame $base.fm -borderwidth 2 -relief sunken canvas $base.fm.cv -yscrollcommand $base.fm.cv_vertscrollbar set scrollbar $base.fm.cv_vertscrollbar -orient vertical \ -command $base.fm.cv yview pack $base.fm.cv -side left -fill both -expand true pack $base.fm.cv_vertscrollbar -side right -fill y pack $base.fm -side top -fill both -expand true set hull [frame $base.fm.cv.hull -borderwidth 2 -relief ridge] set wid [winfo width $base.fm] $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window bind $base.fm.cv Configure ResizeCanvas %W %w %h return $hull } I have successfully translated the code until the line $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window which i don't fully understand because i started with tcltk just this week. I tried to translate this line using the R function tkcreate, but i didn't get very far. Thanks for your help. Greetings, Thomas Stabla __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk - tkcreate question
Thomas Stabla [EMAIL PROTECTED] writes: I have successfully translated the code until the line $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window which i don't fully understand because i started with tcltk just this week. I tried to translate this line using the R function tkcreate, but i didn't get very far. I assume you got the canvas ($base.fm.cv) stored in a variable, cv, say, and hull similarly. Then my first guess would be tkcreate(cv, window, 0, 0, anchor=nw, window=hull, width=10, height=5, tag= window) -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk - tkcreate question
On 27 Nov 2003, Peter Dalgaard wrote: Thomas Stabla [EMAIL PROTECTED] writes: I have successfully translated the code until the line $base.fm.cv create window 0 0 -anchor nw -window $hull -width 10 -height 500 -tag window which i don't fully understand because i started with tcltk just this week. I tried to translate this line using the R function tkcreate, but i didn't get very far. I assume you got the canvas ($base.fm.cv) stored in a variable, cv, say, and hull similarly. Then my first guess would be tkcreate(cv, window, 0, 0, anchor=nw, window=hull, width=10, height=5, tag= window) Works fine, thank you for your fast help. Best regards, Thomas Stabla __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] R TclTk iwidgets::comboboc
Hi, I am trying to create a drop-down combobox in R TclTk. The following works fine for a ListBox but fails for a combobox: # THIS WORKS FINE - CREATES AN EMPTY LISTBOX ## tt-tktoplevel() win - .Tk.subwin(tt) .Tcl(paste(listbox,.Tk.ID(win),.Tcl.args())) tkpack(win) ## THIS FAILS - ATTEMPTS TO CREATE A COMBOBOX ## tt-tktoplevel() win - .Tk.subwin(tt) .Tcl(paste(iwidgets::combobox,.Tk.ID(win),.Tcl.args())) Error in structure(.External(dotTcl, ..., PACKAGE = tcltk), class = tclObj) : [tcl] . I am using R 1.6.2 (with tcltk package 1.6.2) and ActiveTcl 8.3.5.0 in Windows 2000. Below I've included some of the relevant ActiveTcl help. I'm not sure why it has funny characters. # # Nonâ.editable Dropdown Combobox # iwidgets::combobox .cb1 â.labeltext Month: \ â.selectioncommand {puts «selected: [.cb1 getcurselection]} \ â.editable false â.listheight 185 â.popupcursor hand1 .cb1 insert list end Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec BTW, Thanks very much to all organizers and presenters at the DSC 2003 - a huge sucess! Regards, James -- James Wettenhall Tel: (+61 3) 9345 2629 Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852 The Walter Eliza Hall Institute E-mail: [EMAIL PROTECTED] of Medical Research, Mobile: (+61 / 0 ) 438 527 921 1G Royal Parade, Parkville, Vic 3050, Australia http://www.wehi.edu.au -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R TclTk iwidgets::combobox
Thanks Peter, I've started a new R session (in Windows) and managed to get both ways working now : ### THIS WORKS !!! ### library(tcltk) tclRequire(IWidgets) tt-tktoplevel() combo - tkwidget(tt,iwidgets::combobox) tkpack(combo) ### AND THIS WORKS TOO !!! ### tt-tktoplevel() win - .Tk.subwin(tt) .Tcl(paste(iwidgets::combobox,.Tk.ID(win),.Tcl.args())) tkpack(win) But they both fail in my old R session - maybe I've tclRequired another package or loaded another package which is interfering or maybe a Tcl object hasn't been cleaned from memory properly. Thanks very much for your help! Regards, James On 27 Mar 2003, Peter Dalgaard BSA wrote: James Wettenhall [EMAIL PROTECTED] writes: Hi, I am trying to create a drop-down combobox in R TclTk. The following works fine for a ListBox but fails for a combobox: # THIS WORKS FINE - CREATES AN EMPTY LISTBOX ## tt-tktoplevel() win - .Tk.subwin(tt) .Tcl(paste(listbox,.Tk.ID(win),.Tcl.args())) tkpack(win) ## THIS FAILS - ATTEMPTS TO CREATE A COMBOBOX ## tt-tktoplevel() win - .Tk.subwin(tt) .Tcl(paste(iwidgets::combobox,.Tk.ID(win),.Tcl.args())) Error in structure(.External(dotTcl, ..., PACKAGE = tcltk), class = tclObj) : [tcl] . Hmm, can't see why that shouldn't work. On Linux, this seems to work fine: tt-tktoplevel() combo - tkwidget(tt,iwidgets::combobox) tkpack(combo) and your code seems to work as well... You remembered to tclRequire(Iwidgets), I assume? -- -- James Wettenhall Tel: (+61 3) 9345 2629 Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852 The Walter Eliza Hall Institute E-mail: [EMAIL PROTECTED] of Medical Research, Mobile: (+61 / 0 ) 438 527 921 1G Royal Parade, Parkville, Vic 3050, Australia http://www.wehi.edu.au -- __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] tcltk makes R crash?
Hello all, I got a problem using the tcltk-package. It makes 'R crash': I can use R and different packages without any problem. However, when I start the tcltk-package, the terminal I'm running R in (no matter what this 'terminal' is), will not recieve any input anymore once I set at statement which cannot be evaluated. The most easy example: library(tcltk) blabla Error: Object blabla not found So, when I give these two commands, the only thing I can do (with the terminal I run R in), is 'kill client' (which is the terminal). Sometimes (I didn't find any logic yet), I cannot see the commands I'm writing, but they are evaluated anyway (so I can quit etc, using the command 'q()', but what I write is not shown on the screen and when I'm out of R, this behaviour doesn't change for the terminal I ran R in). I'm using Debian woody, R 1.6.2. Anyone any idea? thanks in advance, Kurt __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk makes R crash?
On Mon, Mar 03, 2003 at 01:14:04PM +0100, Kurt Sys wrote: I got a problem using the tcltk-package. It makes 'R crash': I can use R and different packages without any problem. However, when I start the tcltk-package, the terminal I'm running R in (no matter what this 'terminal' is), will not recieve any input anymore once I set at statement which cannot be evaluated. The most easy example: library(tcltk) blabla Error: Object blabla not found So, when I give these two commands, the only thing I can do (with the terminal I run R in), is 'kill client' (which is the terminal). [...] I'm using Debian woody, R 1.6.2. That sounds really odd. How did you get 1.6.2 onto Debian 3.0 (woody)? One thing you could try is to install the (older) Debian R package from the same Debian 3.0 release, which should execute the sequence above cleanly. You could then proceed in increments: a) rebuild that R version locally on your woody machine to demonstrate that it still works given your libraries, and then b) grab the 1.6.2 source and build the Debian package locally against the same setup as in a). That is bound to work almost surely. Let me know (off the list) if I can help with a) or b). Dirk -- Prediction is very difficult, especially about the future. -- Niels Bohr __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] tcltk installation problem
Dear all, I want to use GraspeR (on R 1.6.0) and have to install tcltk library. When I try to do this, I get back this error message: Error in firstlib(which.lib.loc, package) : TCL_LIBRARY is not set Error in library(pkg, character.only = TRUE) : .First.lib failed But I have a tcl/tk package (Active TCL 8.4.1.0) correctly install on my PC (Win95) and in the autoexec.bat the path for bin and lib . So where am I wrong?? Thanks for advance. With very best regards, Erik. Erik-André SAULEAU SEAIM Hôpital du Hasenrain BP 1070 87, Avenue de Altkirch 68051 MULHOUSE Cédex Tel: 03-89-64-79-95 Fax: 03-89-64-79-71 Mél: [EMAIL PROTECTED] Web: http://www.ch-mulhouse.fr Afin d'éviter toute propagation de virus informatique, et en complément des dispositifs en place, ce message (et ses pièces jointes s'il y en a) a été automatiquement analysé par un antivirus de messagerie. *** __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk installation problem
You have to install the previous version of Active Tcl/Tk : 8.3.5.0. A.S. |+| |Alessandro Semeria |Tel. +39 544 536811 | |+| |Models and Simulation Laboratory|Fax. +39 544 538663 | |+| |The Environment Research Center - || |Montecatini (Edison Group),Via || |Ciro Menotti 48,|E-mail: [EMAIL PROTECTED] | |48023 Marina di Ravenna (RA), Italy || |+| __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] tcltk installation problem
SAULEAU Erik-André wrote: Dear all, I want to use GraspeR (on R 1.6.0) and have to install tcltk library. When I try to do this, I get back this error message: Error in firstlib(which.lib.loc, package) : TCL_LIBRARY is not set Error in library(pkg, character.only = TRUE) : .First.lib failed But I have a tcl/tk package (Active TCL 8.4.1.0) correctly install on my PC (Win95) and in the autoexec.bat the path for bin and lib . So where am I wrong?? Thanks for advance. With very best regards, Erik See the R for Windows FAQ 3.6 Package TclTk does not work. (I guess you are on Windows) Uwe Ligges __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help