[Rd] binary file access [was "RFC: System and time support"...]

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Tue, 25 Jul 2000 09:47:55 +0200 (CEST)


>>>>> "Duncan" == Duncan Murdoch <murdoch@stats.uwo.ca> writes:

    Duncan> On Thu, 20 Jul 2000 08:33:01 +0100 (BST), you wrote in message
    Duncan> <Pine.GSO.4.05.10007200826030.9485-100000@auk.stats>:

    >> I've been looking over system utility functions that we might want
    >> to add to R.  A few come out of specific needs, others from looking
    >> at other systems and what people are using system() for.  I've taken
    >> account of Paul Gilbert's comments posted here a while ago (and I
    >> think covered all except the use of mailers).

    >> We currently have
    >> 
    >> date *.socket file.create file.exists file.remove file.append

    Duncan> Is there any interest in adding binary file access to the base?

yes, quite a bit !  (e.g., someone here doing image analysis, would have
liked to be able to do  this)

    Duncan> I think it would be really useful, and have put together a
    Duncan> prototype (still for Windows only) that's on my web site at
	                        ==============
    Duncan> <http://www.stats.uwo.ca/faculty/murdoch/software/Rstreams.zip>

I first thought "great! .." when you announced this a while ago, but
"Windows only" & relying on Delphi, i.e. proprietary software,
stopped me to even have a look, sorry.
We are committed primarily to the POSIX "clarification" of ANSI C and freely
available tools.

An aside :

  Your binary files are read into/from "character", right?

  I think (and others have talked similarly, here) that byte wise
  reading and writing of files should go together with a "raw" atomic data
  type in R -- and then we probably would want to do it "S version 4" (Sv4)
  compatibly (not that I have looked what this would mean exactly).
  which needs even a bit more extensions in "base R" than we have now.


Coming back to your package:
Is it worth/fast enough to port this to POSIX C?
Have you ever compared it to the (very general) approach taken by Sv4 ?
That would be something worth following at least in parts, I think.

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._