Skip to content
Prev 393645 / 398506 Next

foreign package: unable to read S-Plus objects

I think you may be right about the cause. From the, ?R Data Import/Export? document I find,

Function read.S which can read binary objects produced by S-PLUS 3.x, 4.x or 2000 on (32-bit) Unix or Windows (and can read them on a different OS). This is able to read many but not all S objects: in particular it can read vectors, matrices and data frames and lists containing those.

This suggests that the binary objects you have cannot be read by this function. The next two paragraphs read,

Function data.restore reads S-PLUS data dumps (created by data.dump) with the same restrictions (except that dumps from the Alpha platform can also be read). It should be possible to read data dumps from S-PLUS 5.x and later written with data.dump(oldStyle=T).

If you have access to S-PLUS, it is usually more reliable to dump the object(s) in S-PLUS and source the dump file in R. For S-PLUS 5.x and later you may need to use dump(..., oldStyle=T), and to read in very large objects it may be preferable to use the dump file as a batch script rather than use the source function.

I think this means that if you had dumped versions of the files you could read them back with data.restore() or source().