[R] S objects

Duncan Murdoch dmurdoch at pair.com
Fri Aug 25 03:19:19 CEST 2000

The best way is (in S) to dump(c('x','y')), and then (in R) to
source() the file.  However, if that's not possible (e.g. you no
longer have access to S), you can try the readSfile() function in the
Rstreams package.  It could definitely read your examples of x and y
below, but sometimes falls down on more complicated objects.

It's available on CRAN, in the "devel" group of packages.

Duncan Murdoch

On Thu, 24 Aug 2000 17:45:35 -0700, Robert Gould
<rgould at stat.ucla.edu> wrote:

>    Is it possible for R to "read in" S objects.  For example, suppose
>that when using S I did:
>> x <- c(1,2,3)
>> y <- x^2
>> q()
>These objects are now in the .Data directory.  If I then want to use x
>and y in an R session, how can I do so?
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