[R] Adding submenus to existing consol GUI menu

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 8 10:29:34 CET 2007


On Thu, 8 Nov 2007, simon gatehouse wrote:

> If possible I would like to add two sub-menus to the R Console under
> Windows.
>
> For example, I would like to add:
> winMenuAddItem("File", "Load CSV...", "loadCSV()")
> winMenuAddItem("File", "Save CSV...", "saveCSV()")
>
> and have them appear under the initial 'File' item rather than add a new
> 'File' menu item. I seem to recall from somewhere that this is
> inadvisable, however is it possible from within R and if so what might
> be the consequences of  such additions?

It was not part of the design.  Since R is Open Source it is 'possible', 
but I doubt it is easy.  The system menus are coded in C in file 
src/gnuwin32/rui.c: their implementation is orthogonal to the facility to 
add user menus.

>    *Simon Gatehouse*
>
>    *Hellman & Schofield Pty Ltd*
> 6/3 Trelawney St., Eastwood, NSW, 2122
> P.O. Box 599, Beecroft, NSW, 2119
> Ph: (02) 9858 3863  Fax: (02) 9858 4057
> Mb 0407 130 635      Skype s.gatehouse

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list