[S] Summary - Converting to Splus 5 - is convertOldLibrary

Carl Schwarz (cschwarz@cs.sfu.ca)
Mon, 23 Nov 1998 09:39:10 -0800

I earlier asked:
>I used the convertOldLibrary to convert my .Data from 3.4 to 5, but it
>strips ALL COMMENTS from all of my functions. This "feature" doesn't seem
>very friendly - is there a work around?

>More to the point, is it really necessary to use the convertOldLibrary if
>the old libraries just have pretty basic functions. For example, most of my
>work involves fitting MLE to generalize linear models using pretty standard
>stuff. Can I just start up Splus 5 using my old .Data libarires and use
>the old functions etc as is?

Thanks to responses from "Robin Regnier" <RRegnier@centrallimit.com>, Chuck
Taylor <chuck@statsci.com>, Prof Brian D Ripley <ripley@stats.ox.ac.uk>,
Todd.Taylor@pnl.gov (Z. Todd Taylor)

StatSci is checking into the problem with convertOldLibrary,
data.dump/data.restore, etc as noted below.

Other suggestions:

>Be sure to create new CHAPTER directories for 5.0. It is not okay to write
>to a 3.4 directory from 5.0. It's not a good idea to just copy directories
>from the Unix prompt. Use data.dump/data.restore instead. It's okay to
>attach the 3.4 directory in position 2 to do this from 5.0. Or if you do
>that, you can simply copy the objects using, for example, x <- x. (This
>will read x from position 2 and write to position 1.)

data.dump/data.restore also had the same feature - i.e. it stripped comments.

attaching the old directory at position 2 and then doing myfunction <-
myfunction also stripped comments.

You can use the 3.4 .Data directories in Splus5 provided you never use
old-style classes, log with two arguments and a few other quirks listed in
the "Getting Started with S-Plus 5.0". This worked fine, however, (as one
person noted)
>using unconverted data objects is a no-no, though. Simply
>attaching an Splus 3.* directory works, but as those objects are
>used in computations memory use seems to increase rapidly and,
>apparently, without bound. (Solaris 2.5.1)

Thanks for everyone's help.. there doesn't appear to be a simple solution,
yet. Because my version 3.4 .Data was fairly small, I did write a simple
function to dump my functions as a text file and then sourced it into
Splus5 and this retained all the comments etc.

mydump <- function()
# dump out all function objects to a text file for future sourcing
stuff <- ls() #
sink(file = "mydump.out")
for(i in 1:length(stuff)) {
if(mode(eval(as.name(stuff[i]))) == "function") {
cat("\n\n\n", stuff[i], "<-")

This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news