On 06/07/2008 10:37 AM, Bert Gunter wrote:> Folks:
>
> I don't know whether the following is a Windows or R problem, nor
whether it
> is particular to my particular Windows version/setup. So any help would be
> appreciated. First the problem, then the info. The following code can be
cut
> and pasted into your R session
>
>
> #############################
> ### start R
> ### create a plot on device 2 (which can be determined by dev.cur())
>
> plot(1:10)
> winMenuAdd("$Graph2Main/newmenu")
>
> ## the menu has been added to the graphics window
>
> #### now close all graphics devices
> ## (can also be done by pointing and clicking on the Windows close icon)
>
> graphics.off()
>
> ## Now repeat
>
> plot(1:10)
> winMenuAdd("$Graph2Main/newmenu")
>
> ## No menu has been added ! -- This is the problem.
> ## However, note:
>
> winMenuNames()
>
> ###### End of Code #####
The problem is that R thinks the menu is there, because it wasn't
cleaned up when the previous window was closed. It won't add repeats,
so you don't get anything added. This should be easy to fix.
Duncan Murdoch
>
> INFO:
>
>> version
> _
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 7.1
> year 2008
> month 06
> day 23
> svn rev 45970
> language R
> version.string R version 2.7.1 (2008-06-23)
>
> OS Details: Windows XP Professional SP 2
>
> Cheers to all,
>
> Bert Gunter
> Genentech, Inc.
>
> ______________________________________________
> 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.