[Rd] xgobi in R on win95

Duncan Temple Lang duncan@research.bell-labs.com
Thu, 13 Apr 2000 07:44:09 -0400 (EDT)


> Date: Thu, 13 Apr 2000 13:20:57 +0200
> From: Erich Neuwirth <erich.neuwirth@univie.ac.at>
> Organization: University of Vienna
> CC: r-devel@stat.math.ethz.ch
> References: <200004121254.NAA22977@toucan.stats.ox.ac.uk>
> Sender: owner-r-devel@stat.math.ethz.ch
> Precedence: bulk
> 
> this time,
> it is REALLY a bug in the r code for the xgobi interface.
> on win95, at least in my configuration,
> xgobi(...,multi=TRUE)
> does not work.
> 
> the temp files R creates are deleted before
> the xgobi process gets a chance to read the files.
> 
> the culprit is
> 
>   on.exit(file.remove(tmpfiles)) 
> 
> on windows95, this deletes the files too early.
> 
> changing it to
>         if(!multi) { on.exit(file.remove(tmpfiles)) }
> 
> solves the problem, but of course has the side effect
> of leaving the the temporary files on the machine.
> i do not understand enough of the mechanics of the system calls 
> involved (yet) to do a full repair myself.
> 
> 
> erich


The lack of synchronization is a fundamental limitation of this style
of inter-process communication. One has to add crude hacks that are
bound to fail under someones configuration in the absence of more
coherent, formal and hence predictable, debuggable approaches are
needed. 

We have two such approaches. Ross, Debby Swayne and I have, at
different times, made modifications to xgobi to allow one to
communicate with it via CORBA.  Combined with the R-CORBA package,
dynamic remote control and query of xgobi is quite simple. With this
approach, the data is transferred directly and no messing with file
systems, timing, etc is needed.

The second approach is to allow XGobi be dynamically loaded into the R
session as a shared library.  I started about a week ago and most of
that is functional (since it shares much of the functionality added
via the CORBA server), but I won't get back to it until next week.
One of the motivations for embedding XGobi into R (& S) is to look at
event-loop integration, with the potential to lead to connections
and/or (internal) threads.  It would be good to know if there is any
interest in having this embedded version for regular use (on Unix,
since it would run in the R process). Otherwise it may not be worth
the effort packaging it up that carefully.

D.

-- 
_______________________________________________________________

Duncan Temple Lang                duncan@research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan

      "Languages shape the way we think, and determine what 
       we can think about."        
                                      Benjamin Whorf
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._