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

Gabor Grothendieck ggrothendieck at gmail.com
Sat Jan 28 22:33:05 CET 2012


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



More information about the R-devel mailing list