[R] Programmatically minimising main R window (on windows)

Berwin A Turlach berwin at maths.uwa.edu.au
Wed Dec 17 02:41:36 CET 2008


G'day Hadley,

On Tue, 16 Dec 2008 18:54:48 -0600
"hadley wickham" <h.wickham at gmail.com> wrote:

> On Tue, Dec 16, 2008 at 5:40 PM, Prof Brian Ripley
> <ripley at stats.ox.ac.uk> wrote:
> > On Tue, 16 Dec 2008, hadley wickham wrote:
[...]
> >> Is it possible to programmatically minimise the main window of the
> >> windows R gui?  I'm designing a small gui with gwidgets & RGtk2
> >> for an non-statistician to use, and it would be nice if I could
> >> easily hide all the R stuff that they don't need.
> >
> > Not from R itself, but you can by Windows script programming (which
> > you can launch by 'system'.  It would also be esay to add a small
> > bit of C code to do so.
[...]

Not sure if this is what you are after, but I believe we had once a
similar problem.  Client wanted to have a GUI that would read in a file
with the list of people who had bought Raffle tickets, select the
winners, and write the winners to a file.  They were just interested in
seeing the GUI stuff and not the underlying R main window &c.  

We ended up giving them an USB stick with R on it and the package we
wrote for them together with other packages they needed.  I attach the
instructions that I wrote up for our consultant (sitting in Perth) on
how I could create such an USB stick  (sitting in Singapore).  UWA has
an authenticating proxy while NUS does not, hence the references to
"--internet2" on that write up.  

As it turned out, if you do not use the standard way of installing R
but select SDI during the installation (if memory serves correctly,
this choice can also be made after R is installed, but then doing this
change is a bit more involved), then you can start R "minimized".  That
is the R main window does not appear.  You just have to make sure that
your code is executed when you start R (via .onAttach, .First &c) and
brings up the GUI that the user is supposed to see.

HTH.

Cheers,

	Berwin

=========================== Full address =============================
Berwin A Turlach                            Tel.: +65 6515 4416 (secr)
Dept of Statistics and Applied Probability        +65 6515 6650 (self)
Faculty of Science                          FAX : +65 6872 3919       
National University of Singapore
6 Science Drive 2, Blk S16, Level 7          e-mail: statba at nus.edu.sg
Singapore 117546                    http://www.stat.nus.edu.sg/~statba
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Install.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20081217/d5c5f15f/attachment.txt>


More information about the R-help mailing list