R-beta: Re: none

Douglas Bates (bates@stat.wisc.edu)
20 Oct 1997 08:49:06 -0500


To: "Jean-Francois Gibrat" <gibrat@proline.jouy.inra.fr>
Subject: R-beta: Re: none
From: Douglas Bates <bates@stat.wisc.edu>
Date: 20 Oct 1997 08:49:06 -0500
In-Reply-To: "Jean-Francois Gibrat"'s message of Mon, 20 Oct 1997 12:32:30 -0700

"Jean-Francois Gibrat" <gibrat@proline.jouy.inra.fr> writes:

> I am currently trying to switch from Splus to R and I would like to know
> whether there is a way of transfering Splus objects stored on disk into the R
> environment. In Splus I would do this using the function get, e.g., foo <-
> get(foo,where="dirname") where dirname is the name of a directory containing
> the Splus objects. In R, argument 'where' of function get appears to be
> replaced by argument 'envir', whose meaning is rather nebulous for me at the
> moment.....

The internal representations of objects in S-PLUS and R are similar,
but different.  The "get" function as you have used it above retrieves
the internal representation of the object.  It is unlikely that a
method could be constructed for R that would make sense of all such
S-PLUS objects.

You may have better luck using a combination of "ed" in S-PLUS and
"source" in R or, even better, use the emacs modes from the ESS (Emacs
Speaks Statistics) library (ftp://ftp.math.sc.edu/rossini/) to run
S-PLUS in one buffer and R in another buffer.  In the S-PLUS buffer
you dump the object in a printable form then from that buffer you load
the object into the R process.

This may sound confusing but the basic idea is that you have to go to
some printable form of the object so you can transfer it from one
system to the other.

One thing I would like to see is the ability of R to parse the
data.dump format of objects created by S.  Has anyone looked at this
at all?
-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=