[R] tcl/tk with R

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Wed Jul 5 19:28:22 CEST 2006


I would like to use tcl/tk with R, and have read "A Primer on the R-Tcl/Tk
Package" by Peter Dalgaard in Rnews, Volume 1/3, September 2001.

Are there more recent do-it-yourself instructions available?

I have been unsuccessful with the example in the tcltk2 package due to a
syntax error.

I think that I have isolated the problem to this code snippet:

for (i in 1:length(Themes)) {
tkadd(themeMenu, "command", label = Themes[i], command = eval(parse(text =
paste("function() tk2theme(\"", Themes[sep = "")))) }

And the problem seems to be here:

paste("function() tk2theme(\"", Themes[sep = ""))

Error: syntax error in "paste("function() tk2theme(\"", Themes[sep = "")"

Further R seems not to like ' \" '

A closer look at the paste command suggests that it is incomplete and should
also contain something like

Themes[i], sep=""

I am using R Version 2.3.1 (2006-06-01) on a DELL WindowsXP system with 2
gig RAM.

Many thanks for your counsel.

Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265

More information about the R-help mailing list