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

2012-01-28 Thread Paul Johnson
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.  On Linux and Mac, that is not as big of a hurdle, so
far as I can tell.  On Debian linux, I found that in a package
libtktable that works, but I have no idea how tough that would be on
other linux systems or Macintosh or Windows.

Another problem is that tcl/tk editions change rapidly, and on several
of our systems, we still don't have access to tcl/tk 8.5
(RedHat/Centos based clusters still running version 5 are like that).

2. Gtk

Building on Rgtk, I found the package RGtk2Extras.  This of course
requires a function gtk tool chain, which used to be a big problem on
the various platforms.  But the function dfedit appears to be almost
exactly what I'm looking for.  I can create a character matrix and put
in letters how I want, but I later face the problem of how to evaluate
the matrix.

Problem: even more than tcl/tk, GTK versions change and become
incompatible, especially across platforms.

What about QT or WX-Widgets.  I gather RkWard is built on KDE, and
hence Qt.  I don't find matrix editors using those languages, but I
don't know why not.

Maybe this is impossible for R core to advise us because you may
disagree on which widget library is best, but if there is some
consensus, I would be glad to know because I would do whatever you
recommend.

I'm pretty sure that, if you said, use library X, version XYZ, then
the worldwide usage of R is sufficiently broad that people would step
forward and help make sure those libraries are packaged for all OS.  I
mean, if there were no tktable package for any linux for which I make
packages (RedHat, Fedora, Debian, Ubuntu), I would create the
packages.   But I'm not doing it now because I have no reason to
believe that is a good path from here on out.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2012-01-28 Thread Gabor Grothendieck
On Sat, Jan 28, 2012 at 2:59 PM, Paul Johnson pauljoh...@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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2012-01-28 Thread John Fox
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-boun...@r-project.org [mailto:r-devel-bounces@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 pauljoh...@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@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel