[R-gui] further on the Rcmdr package

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed May 21 23:06:05 MEST 2003


John Fox <jfox at mcmaster.ca> writes:

> A partly unresolved issue is the problem raised by Dirk Eddelbuettel
> on Sunday: Dirk found that both the R session and the Commander
> windows locked up after the Rcmdr package was loaded on his Debian
> Linux system. Following Dirk's suggestion, I've added an option to
> Rcmdr to call tkwait until the Commander window is closed. Apparently
> this solves the problem that Dirk experienced, but an unfortunate
> consequence is that the command prompt in the R session is disabled
> until the Commander window is closed. Although this isn't a fatal
> problem -- commands can still be entered through the GUI, including
> via the log/script window -- it would be nice to be able to enter
> commands directly at the command prompt as well. I can do this when
> the call to tkwait is bypassed on Windows systems and on my Red Hat
> Linux system. Since no one else reported the problem, I assume that
> the package also works without the call to tkwait on a number of other
> systems.

This is definitely not supposed to happen, so perhaps a little session
with gdb to figure out where things are getting stuck? I do have some
suspicions about interference between R and threaded Tcl libs, but
Dirk knows about that.

> Another, though smaller, unresolved issue has to do with my inability
> to use the Rcmdr package (or any tcltk-based code) with R under the
> MDI in Windows. Can anyone tell me what the source of the problem is
> (that is, why dialog boxes won't stay in front of the R-GUI window)?
> Is it likely that the problem will be fixed? I actually prefer the
> SDI, but notice that most of my students like the MDI, which is the
> default when the Windows distribution of R is installed.

It might be useful to query the Tcl community on that one. Various
ideas have been suggested, see for instance a search on
groups.google.com for

  tk Windows "always on top"
 
Another, more radical idea could be to get the usual MDI code to
generate a blank window for the Rcmdr, get the hWnd of it somehow and
then use tktoplevel(....,use=hWnd,....). There are several unknowns in
that equation, though.

> As usual, comments and suggestions are appreciated. I expect that I'll
> submit a version of the Rcmdr package to CRAN soon.

I played with it briefly. A few random comments:

- Loading packages and installing them from CRAN could be added
  quite easily (there's a bit of stuff in the tkStartGUI
  function, which you'd be welcome to lift).

- It shouldn't be hard to create a list of loadable datasets and
  select from it.

- Perhaps, use with(dataframe, ...) instead of attach/detach
  constructs?

- It's not easy to find out how to convert variables to factors. If
  categorical variables come in as numerics, there are lots of things
  that you cannot do, so the user needs a way to identify and solve
  the problem quickly.

- The recode syntax is a bit arcane. I think SAS/Analyst does this
  kind of stuff with a table.



-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-SIG-GUI mailing list