Skip to content
Prev 393648 / 398503 Next

foreign package: unable to read S-Plus objects

I just checked the header:

read.S from foreign expects:

  readheader <- function(s) {
         head <- readBin(s, "int", 8L, 1L)
         all(head == c(0L, 83L, 32L, 100L, 97L, 116L, 97L, 1L))
     }

but head is

[1]  0 83 32 86 52 45 77  3

i.e. similar but not identical, so a different format is used (S-PLUS 6 
or later).
Likely, it is not too hard to write some import function based on read.S 
if the file format is documented anywhere. Unfortunately, I do not find 
any web resources for it.


So simplest way would be to install the old S-PLUS version and export 
all data in a readable format.

Best,
Uwe Ligges
On 17.01.2023 14:21, Viechtbauer, Wolfgang (NP) wrote: