[Rd] need gui matrix editor: does R Core team have advice on how?

John Fox jfox at mcmaster.ca
Sat Jan 28 23:04:51 CET 2012


Dear Paul and Gabor,

The Rcmdr GUI uses the tcltk package, so I have some experience with
providing an R tcltk-based GUI for various platforms. 

As Gabor says, everything works very smoothly on Windows because the R
Windows binary includes Tcl/Tk. On Mac OS X, it's necessary for the user to
install Tcl/Tk for X Windows and to insure that X Windows is installed (as
it typically is in recent releases of Mac OS X). In my experience, most
Linux users already have Tcl/Tk and X Windows (or if they don't, they're
familiar with how to install software on their systems), so that things work
smoothly there as well. 

The upshot of this is that Mac OS X is the platform that seems to generate
the most problems for naive users, although installing Tcl/Tk for X Windows
isn't that difficult. Take a look, e.g., at the Rcmdr installation notes
<http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html>.

I hope this helps,
 John

--------------------------------
John Fox
Senator William McMaster
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox



> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-
> project.org] On Behalf Of Gabor Grothendieck
> Sent: January-28-12 4:33 PM
> To: Paul Johnson
> Cc: R Devel List
> Subject: Re: [Rd] need gui matrix editor: does R Core team have advice
> on how?
> 
> On Sat, Jan 28, 2012 at 2:59 PM, Paul Johnson <pauljohn32 at gmail.com>
> wrote:
> > Dear R-devel:
> >
> > Would R core team consider endorsing a graphical toolkit and trying
> to
> > facilitate development of little GUI tools?
> >
> > I need a gui matrix editor for users that want to be able to write
> > matrices that are later used to simulate data.  Instead of teaching
> > them to write a covariance matrix (for example, for mvtnorm), I want
> > to tell them run a function that pops up a table they can fill in.
> >
> > The users need to be able to enter variable names in the matrix, so
> > something that would accept
> >
> > a  0  0
> > 0  b  0
> > c  d  e
> >
> > would be great.  Something that would accept formulae like this
> would
> > be even more great.
> >
> > a  0  0
> > 0  b  a^2
> > c  d  e
> >
> > I want this gui matrix editor to "just work" on Windows, Mac, Linux.
> I
> > don't mind building this on top of some widget set, but it is
> > important that the widget set be easily installable on the user end.
> >
> > That's why I wish R core would offer us some guidance or
> advice.  I'm
> > not a programmer, but I can learn to program with a library, as long
> > as it is not a waste of time.
> >
> > I've been searching R archives and here's what I found so far.
> >
> > 1. tcl/tk
> >
> > Building on R tcltk2, for people that have the Tcl addon widget
> > TkTable installed, there are several packages.  in tcltk2 itself,
> > there is a function tk2edit, and there are others that try to
> > embellish.  I've tried several of these, they seem to be not-quite
> > done yet, one can't copy a rectangle, for example. But maybe I could
> > learn how to fix them up and make yet another tktable based editor.
> >
> > Problem: requires user to have enough understanding to install the
> Tcl
> > widget TkTable.  And, for platforms like Windows, user has to
> install
> > tcl/tk itself.
> 
> Regarding Windows, both the tcltk R package and tcl/tk itself are
> included with R for Windows and work out of the box without doing
> anything special.   You can use addTclPath(libdir) to add additional
> locations to the tcl library search path so you can include additional
> tcl/tk packages in your R package and in conjunction with
> system.file(..., package = "myPackage") you can have them
> automatically accessed without the user having to do anything special.
>  Also you can use all or nearly all of tcl's facilities including
> sourcing your own tcl code and you can issue tcl commands one by one
> from R too using the facilities of the tcltk package.  There are also
> various other R packages that build on top of tcltk.
> 
> I too think that a standard R installation should ensure that tcltk
> just works out of the box but that seems not to be the case for every
> R distribution although it is true for some (possibly most) including
> the standard Windows distribution.
> 
> 
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list