[R-gui] Converting RSPython objects and R-TclTk analogy
James Wettenhall
wettenhall at wehi.edu.au
Wed Jun 23 04:53:07 CEST 2004
Hi Vaidotas,
Duncan may have answered your question already, but you should
be aware of the .convert argument of the .Python() function.
Using .convert=FALSE in .Python() should help to avoid errors
from RSPython like "Failing in conversion..."
An R-Tcl/Tk analogy is the following:
result <- tkmessageBox(message="Hello")
After clicking OK, result is an object of class "tclObj", and we
can find its value ("ok") using tclvalue(result).
So
result <- tkmessageBox(message="Hello")
is similar to using .convert=FALSE in RSPython's .Python()
and
result <- tclvalue(tkmessgaeBox(message="Hello"))
is similar to using .convert=TRUE in RSPython's .Python()
Hope this helps,
James
P.S. I really should come up with a better "patch" to
helpers.cpp than then one I mentioned before. Rather than
overwriting sysargv no matter what, I should only overwrite it
if its Python value is NULL.
More information about the R-SIG-GUI
mailing list