[R] Menu addditions to Rcmdr v0.9-6

John Fox jfox at mcmaster.ca
Tue Apr 20 02:59:35 CEST 2004

Dear Charles, 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of White, 
> Charles E WRAIR-Wash DC
> Sent: Monday, April 19, 2004 10:16 AM
> To: R Help (E-mail)
> Subject: [R] Menu addditions to Rcmdr v0.9-6
> 1)     In general, I would appreciate help in adding 
> functions to the Rcmdr
> menu system. 

I realize that the documentation for adding capabilities to the Rcmdr is
woefully inadequate. When I have time this summer, and before I bump the
version number to 1.0-0, I plan to provide better documentation. 

> I've been able to modify the menus themselves 
> and source test code but I can't get R functions to execute 
> from the menu. My latest proof of concept code follows:
> Three lines added to "Rcmdr-menus.txt":
>     menu    junkMenu        topMenu         ""                ""
>     item    junkMenu        command         "Print stuff..."  
> "function()
> stuff ()"
>     item    topMenu         cascade         "Junk"            junkMenu
> "stuff.R":
> stuff <-function(){
> c("This is stuff to print...")
> }

For this kind of function call, you have to add an explicit print():

stuff <-function(){
  print(c("This is stuff to print..."))

> 2)     A file called "compareModels.demo" is mentioned in the 
> documentation
> but I haven't been able to find it in the Windows library 
> downloaded from CRAN. Where should I look?

Unfortunately, as also happened with a previous example, I became too
enamoured of the compare-models dialog, which is now called by the "Models
-> Hypothesis tests -> Compare models" menu. I'll try to come up with a
sufficiently uninteresting example so that I don't do this again. You can
still examine the compareModels function, however, by looking at the R code
for the package.

I'm sorry that you encountered this problem.


> Thanks!
> Chuck
> Charles E. White, Senior Biostatistician, MS Walter Reed Army 
> Institute of Research
> 503 Robert Grant Ave., Room 1w102
> Silver Spring, MD 20910-1557
> 301 319-9781
> Personal/Professional Site:
> http://users.starpower.net/cwhite571/professional/ 
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list