Ross Darnell wrote:
I am using the Windows menu functions below which will work on the
first pass, but if I repeat the same script I cannot get the
WinMenuAddItem to work. This is a problem if I change the menu
structure and reread the source code I am forced to quit and restart Rgui.
"try.menu" <- function(){
OS <- .Platform$OS.type
GUI <- .Platform$GUI
if (!(OS == "windows" & GUI == "Rgui")) return("Sorry, you must be running R using
Rgui.exe on MS Windows")
try(winMenuDelItem('EMG/Graphics','Plot.trace'))
^ note the dot
try(winMenuDel('EMG/Graphics'))
try(winMenuDel("EMG"))
winMenuAdd("EMG")
winMenuAdd("EMG/Graphics")
winMenuAddItem("EMG/Graphics","Plot trace","plot.trace()")
^ note the blank
Uwe Ligges
}
"plot.trace" <- function(){
x <- eval(parse(text=trace.dialog()))
plot(x,type="l")
invisible()
}
Help much appreciated
Ross Darnell
______________________________________________
[EMAIL PROTECTED] 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