[R] MenuRead() Question

Keith Chamberlain Keith.Chamberlain at colorado.edu
Sun Mar 26 11:41:25 CEST 2006


Dear List-mates,

I think the difficulty I'm having is localized to the MenuType() call made
from within MenuRead(). I'm not used to seeing text operations such as "^"
or "[]", so am having trouble understanding what's going on.

I'm interested in understanding the regular expression:
regexpr("^[$]Tk[.].+/", menu), and why it my menus.txt file is not returning
at that point. 

?regex explains that the "^" symbol excludes the text enclosed in brackets
what is in the character string in following brackets, so a bunch of
matching on string vectors going on that I don't understand well enough yet.
Do I need to install PCRE-6.6 for this to start working?

Rgds,
KeithC.



-----Original Message-----
From: Keith Chamberlain [mailto:chamberk at colorado.edu] 
Sent: Saturday, March 25, 2006 4:26 PM
To: 'r-help at stat.math.ethz.ch'
Cc: 'Philippe Grosjean'
Subject: MenuRead() Question

Dear List-mates,

I'm trying to read a tk window menu from a file using {svWidgets} and
'menus.txt' but am receiving Warnings without seeing the desired
consequences of the call.

library(svWidgets)
tkWinAdd("KSesnMain",title="kLab Session Manager for R", pos="+0+0")
MenuRead(file="menus.txt")

Warning messages:
1: Unrecognized menu type for $KSesnMain/MenuTest in: MenuType(menu) 
2: Unrecognized menu type for $KSesnMain/MenuTest in: MenuType(menu) 
3: Unrecognized menu type for $KSesnMain/MenuTest in: MenuType(menu) 
4: Unrecognized menu type for $KSesnMain/MenuTest in: MenuType(menu)

<menu.txt - in RHOME>
$KSesnMain
|$MenuTest
||Objects  ~~ ls()
||-
||Path	   ~~ search()

Please Advise,
KeithC.




More information about the R-help mailing list