On 1/15/2009 10:18 AM, davide.massidda at unipd.it wrote:
Dear R-helpers,
I have a problem with the tcl "after" instruction. When I send:
Loading Tcl/Tk interface ... done
tcl("after",1000,cat("try tcl after\n"))
try tcl after
<Tcl>
the tcl command works fine. Similarly, the tcl command:
tcl("after",1000,plot(rnorm(100)))
<Tcl>
works fine. But, if I send the command:
<Tcl> after#0
appears a popup window which reports:
Error: invalid command name ?100?
Why?
The value of cat("something") is NULL, the value of plot(something) is
NULL, but the value of 10^2 is 100. You're trying to execute no Tcl
command in the first two cases, but you're trying to execute the command
"100" in the last, and that's not a legal Tcl command.