[R-gui] Something odd about Windows GUI with the menu command

T. Marthews Toby.Marthews at lsce.ipsl.fr
Fri Nov 30 14:38:35 CET 2007


Dear R-sig-gui,

I'm using R 2.5.1 for Windows. Here's an interesting one (perhaps!):

If I have the Console window about 80 characters wide, I can do the
following commands:


>
> a=c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
> menu(a)

 1: Jan   2: Feb   3: Mar   4: Apr   5: May   6: Jun   7: Jul   8: Aug
 9: Sep  10: Oct  11: Nov  12: Dec

Selection: 13
Enter an item from the menu, or 0 to exit
Selection: 3
[1] 3
>
>

...which is pretty much what one would expect. However, if I make the
Console window about twice as wide and do the same commands, I get:

>
>
> a=c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
> menu(a)

 1: Jan   2: Feb   3: Mar   4: Apr   5: May   6: Jun   7: Jul   8: Aug  
9: Sep  10: Oct  11: Nov  12: Dec   1: Jan   2: Feb   3: Mar   4: Apr  
5: May   6: Jun   7: Jul   8: Aug


Selection: 13
Enter an item from the menu, or 0 to exit
Selection: 3
[1] 3
>
>

My question is: where do those extra non-existent menu options come from?

Thanks to anyone who has time to look at this.

Toby



More information about the R-SIG-GUI mailing list