[R] demo(tkttest) exits with error messages

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Feb 10 16:05:58 CET 2001


On Sat, 10 Feb 2001, Yves Gauvreau wrote:

>
> > -----Message d'origine-----
> > De : owner-r-help at stat.math.ethz.ch
> > [mailto:owner-r-help at stat.math.ethz.ch]De la part de Peter Dalgaard BSA
> > Envoye : Saturday, February 10, 2001 6:47 AM
> > A : Prof Brian D Ripley
> > Cc : Griffith Feeney; r-help at stat.math.ethz.ch
> > Objet : Re: [R] demo(tkttest) exits with error messages
> >
> >
> > Prof Brian D Ripley <ripley at stats.ox.ac.uk> writes:
> >
> > ...
> > > For package tcltk to work (try `demo(tkdensity)' or `demo(tkttest)')
> > > you need to have Tcl installed.  Download `tcl832.exe' (or use
> > > `tcl831.exe' if you already have it) from <dev.scriptics.com> and
> > > install it. (That will put the `bin' directory containing the Tcl and
> > > Tk DLLs in your path).  You then need to set the environment variable
> > > `TCL_LIBRARY', to something like `c:/Program Files/Tcl/lib/tcl8.3'.
> > > (The startup code for the package will warn you if this is unset, and
> > > Q3.2 explains how to set them.  NB: do not quote the path, even if as
> > > here it contains spaces.)
> > >
> > >
> > > There has been discussion of this on the list several times, and the
> > > information is also in CHANGES.  But I think it is precisely
> > what FAQs are
> > > for!
> >
> > BTW, last I played with this, I found that the following worked nicely
> > from inside R (can be useful if you have no access to the system
> > startup files).
> >
> > Sys.putenv("TCL_LIBRARY"="c:/Program Files/Tcl/lib/tcl8.3")
> >
> > What *is* the recommended way of setting environment variables on
> > Windows anyway?
>
> I notice that if one sets an environment variable from outside while R is
> running it as no effect at least under NT. The same goes for cmd.exe for
> example, if you set some environment variable via the control panel it will
> not be visible to cmd.exe this time around. If you restart R you will get
> the new environment setting.

That's true for any OS: environment variables are inherited at startup.
The *only* was to set them on a running R process is via Sys.putenv (or C
code).

>
> I've managed to get some of the TclTk demos to run but some don't run to
> good. At least not all of them:
>
> > demo("tkttest")
>
>
>         demo(tkttest)
>         ---- ~~~~~~~
>
> Type  <Return>   to start :
>
> > require(tcltk) || stop("tcltk support is absent")
> Loading required package: tcltk
> [1] TRUE
>
> > require(ctest)
> [1] TRUE
>
> > local({
>     dialog.t.test <- function() {
>         tt <- tktoplevel()
>         tkwm.title(tt, "t test")
>         x.entry <- tkentry(tt, textvariable = "xvar")
>         y.entry <- tkentry(tt, textvariable = "yvar")
>         reset <- function() {
>            .... [TRUNCATED]
> ******************************************************
>  The source for this demo can be found in the file:
>  D:\R\rw1021/demos/tcltk/tkttest.R
> ******************************************************
> ### Command executed via Tk ###
> t.test(Ozone[Month == 5], Ozone[Month == 8], alternative = "two.sided",
>     var.equal = TRUE)
> ### -----
>
>           Two Sample t-test
>
> data:  Ozone[Month == 5] and Ozone[Month == 8]
> t = -4.0749, df = 50, p-value = 0.0001645
> alternative hypothesis: true difference in means is not equal to 0
> 95 percent confidence interval:
>  -54.26163 -18.43068
> sample estimates:
> mean of x mean of y
>  23.61538  59.96154
>
> Warning message:
> list.files: D:\R\rw1021\bin/data is not a readable directory
> >
>
>
> ******************* I don't know if this is ok or not!
> **************************

It should not be there.  I suspect you have not set the working directoy
in the shortcut you used to start R: see the rw-FAQ Q2.2.  Do set it to
somewhere which will not clobber the R installation, and remove the file
D:\R\rw1021\bin\data


> > demo("tkfaq")
>
> Shows the window with the faq and starts complaining with errors as soon as
> I try to scroll or close it. I had to quit R to close it!

Works for me.

> > demo("tkdensity")
>
> Seems to work fine.
>
> > demo("tkfilefind") & demo("tkcanvas")
>
> Seems to work fine also.
>
>
> Just to make sure, I'm not complaining here, I just report what I observe.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list