[R] readSfile (Rstreams)

Duncan Murdoch dmurdoch at pair.com
Mon Jun 25 14:37:11 CEST 2001


On Mon, 25 Jun 2001 11:12:28 +0200 (MET DST), you wrote:

>
>Hi!
>
>The manual entry for readSfile states:
>
>"Not all S-PLUS objects can be handled in the current version. The most
>frequently encountered exceptions are functions and expressions"

The problem is that S-PLUS and R use different internal
representations for some things.  I can't remember any examples now,
but the sort of difference I'm talking about would be like storing 

 a+b+c+d

as

 +(a,b,c,d)

versus

 +(a,+(b,+(c,d)))

In this hypothetical example, the second system might think of "+" as
a function taking two arguments, and not understand the first listing
at all.

One thing you could probably do would be to modify readSfile to print
out debugging information about what it is reading instead of trying
to reconstruct the object as it is being read.  Then you (who are a
lot smarter than readSfile!) could figure out the specific problems it
is having with your functions, and add code to readSfile to handle
those things.  

But it would probably be easier to just install a copy of S-PLUS
somewhere, get it to read your files and generate ASCII dumps, and use
those.  As far as I know current versions of S-PLUS can still read
version 3.x files.  

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list