Re: [R] Windows Only: winMenuAdd() problem

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Sun, 06 Jul 2008 11:25:07 -0400

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.


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. Received on Sun 06 Jul 2008 - 15:30:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Jul 2008 - 15:31:56 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive