[R] Transferring data from S+ to R

Simon Fear fears at roycastle.liv.ac.uk
Thu Jan 14 12:39:44 CET 1999


There are three stages to this process. Can I make a plea that this goes
into the FAQ perhaps headed 'switching to R from S' ... and would
someone provide the Windows names of the Unix Splus names below ...

1) In your Splus directory, use the operating system to get rid of
anything that will be meaningless to R (failing to do this cleanup may
give fatal errors in stage 3). In particular get rid of .Audit,
.Random.seed (R uses a different format for .Random.seed), last.warning,
last.dump, and .Last.value (just to be sure) and probably .First will
have some Splus-specific, non-R stuff in it. Objects of user-defined
classes might also cause problems.
2) Start Splus using your cleaned .Data directory. If you got any output
or warnings from your .First(), or perhaps best anyway, use
rm(last.warning,last.dump,.Last.value). Then immediately issue the
command dump(objects(),file='myfile').
3) In R, > source('myfile')

Alternatively, replace step 3 by the command line form R < myfile (Peter
Dalgaard's suggestion; more robust.)

Do remember that *R is not S* and differences in scoping rules mean that
some apparently straightforward Splus functions will need to be
rewritten in R. In particular, they may need reassigning so that they
pick up the right embedding environment. Watch out especially for
ellipses (...) arguments ...


-----Original Message-----
From: zk at biocem.univ-bpclermont.fr [mailto:zk at biocem.univ-bpclermont.fr]
Sent: 14 January 1999 08:44
To: r-help at stat.math.ethz.ch
Subject: [R] Transferring data from S+ to R


I would like to know if there is an easy way to transfer all the data
from
a S+ directory (".Data" or "_data") to an R image? I would like to
transfer
all the functions and all the data sets (data frames, vectors, lists,
etc.).

I'm working under Windows NT and am using S+ 3.3 for Windows.

Zivan


Zivan Karaman
Limagrain Genetics Research, B.P. 115, 63203 Riom Cedex, France
Tel: +33 (0) 473 634 343     Fax: +33 (0) 473 634 345
E-mail: zivan.karaman at biocem.univ-bpclermont.fr
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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