[R-gui] Re: R-SIG-GUI digest, Vol 1 #3 - 9 msgs

Duncan Murdoch murdoch@stats.uwo.ca
Fri, 18 Oct 2002 09:53:24 -0400


On Thu, 17 Oct 2002 23:22:16 -0400, you wrote in message
<20021017232216.A2786@jessie.research.bell-labs.com>:

>Duncan Murdoch wrote:
>> On Thu, 17 Oct 2002 21:32:32 -0400, you wrote:
>> 
>> >I think it is hard to get it configured on other people's machines.
>> >But I don't think it is technically too hard to get it to work as a
>> >regular server. What are the problems you have encountered.  (I agree
>> >things could be better and have some plans to make it easier and more
>> >platform independent, but they do involve significant reorganization
>> >of code.)
>
>Thanks for the feedback.
>
>> 
>> The biggest problem is that R thinks that it's in charge. There
>> shouldn't be an event loop in R, or a console, or any other
>> user-interface element.  R should provide the back end services that
>> let a front end user interface function, but it should make the least
>> possible assumptions about what that interface looks like.
>
>That is quite easy to do.  That's how we write most of the
>inter-system interfaces that embed R, e.g. Gnumeric, Netscape, Python,
>Perl, Java, and so on.

That's really good news.  Could a section be added to r-exts.texi
describing the stable part of this interface?  The difficulty for
someone like me who isn't familiar with the internals is knowing which
ones matter.  It would also be nice to know which ones will go away
without warning.

>If you really want to do that (I don't think it works in general
>except when relaying the output, e.g., directly to another display),
>just call a myEval() function which sinks the output to a
>textConnection() and return the result.  One can also use the
>taskCallback mechanism to have the result handled in a particular
>way. I am a big fan of event-driven programming and using callbacks
>to modularize behaviour that can be dynamically specified.

I don't think taskCallback is mentioned in r-exts.texi, either.  Could
we also add it as an alias to the taskCallback.Rd help file?

>So all these are great to know about. More documentation is needed for
>how to run R as an embedded engine. I'll do this as time permits.
>Exceptions will be a very useful addition.

That'll be great!

Duncan Murdoch