[R] MenuRead() Question

Gabor Grothendieck ggrothendieck at gmail.com
Sun Mar 26 15:01:48 CEST 2006


On 3/26/06, Keith Chamberlain <Keith.Chamberlain at colorado.edu> wrote:
> 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

Outside of [...] ^ and $ mean beginning of string and end of string.
Putting characters within [...] removes their special meaning.

> 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.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list