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? *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
You could try deleting all the existing menus and then recreating them in the way you want. I believe that once worked although I haven't tried it recently. On Nov 7, 2007 4:14 PM, simon gatehouse <simon at hellscho.com.au> 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? > > > *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 > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
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