On Wed, 22 Dec 1999, Oded Maron wrote:
> I'm trying to move objects from S5.1 to S3.4 (on Solaris)
> using data.dump and data.restore. As a simplified example of the
> wierd behavior I'm seeing:
>
> First on Splus5.1:
>
> > version
> Version 5.1 Release 1 for Sun SPARC, SunOS 5.5 : 1999
>
> > a <- matrix(1:4, 2,2)
>
> > class(a)
> [1] "matrix"
>
> > data.dump("a", file="../tmp/a.dump", oldStyle=T)
>
> > class(a)
> [1] "structure"
>
> Now on Splus3.4:
>
> > version
> Version 3.4 Release 1 for Sun SPARC, SunOS 5.3 : 1996
>
> > data.restore("../tmp/a.dump")
> Error: Invalid object: no data attribute: structure(..
> Dumped
> Error was while calling subroutine "S_restore"
Exactly that works for me on exactly those systems, cut-and-paste from your
message.
> Note that data.dump actually modifies the class of a !!
It must do. There is no class matrix in 3.4, and if there was it could not
be an S4-style class. You asked for conversion to S3-style objects.
> What's going on?
Perhaps you could check again? For me
cat a.dump
a
structure
3
.Data
integer
4
1
2
3
4
.Dim
integer
2
2
2
NULL
0
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-----------------------------------------------------------------------
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
|