[R] How to bring an Splus object into R

Liaw, Andy andy_liaw at merck.com
Sun Jul 11 22:06:28 CEST 2004

>From the `R Data Import/Export' manual, shipped with R, as well as available
from the official R web site (last three paragraphs of Section 3.1,
describing functions in the `foreign' package):

Function read.S which can read binary objects produced by S-PLUS 3.x, 4.x or
on (32-bit) Unix or Windows (and can read them on a di
erent OS). This is able to read
many but not all S objects: in particular it can read vectors, matrices and
data frames and
lists containing those.
Function data.restore reads S-PLUS data dumps (created by data.dump) with
the same restrictions (except that dumps from the Alpha platform can also be
It should be possible to read data dumps from S-PLUS 5.x and 6.x written
If you have access to S-PLUS, it is usually more reliable to dump the
object(s) in S-PLUS
and source the dumpfile in R. For S-PLUS 5.x and 6.x you may need to use
oldStyle=T), and to read in very large objects it may be preferable to use
the dumpfile as
a batch script rather than source.

Please learn to read the manual yourself.


> From: Victoria Landsman
> Dear all, 
> I like to bring the list created in Splus into R. What is the 
> shortest way to do this? 
> Much thanks, Vicky. 
> 	[[alternative HTML version deleted]]

More information about the R-help mailing list