Re: [R] SPSS import problem

From: Prof Brian Ripley <>
Date: Wed, 12 Mar 2008 19:10:46 +0000 (GMT)

On Wed, 12 Mar 2008, K. Elo wrote:

> Hi again,
> many thanks for Your answers. So, if I understood Wei right:
> Zhao, Wei (Cancer Center) wrote (12.3.2008):
>> I had a similar problem when read one of my spss.sav with long
>> variable label. But when I read another spss.sav with short label the
>> same way, I don't have problem.
>> Seems like R only allows variable labels of lengths 1...255 as your
>> error message showed.
> Searching (in SPSS) all variable labels of length > 255 and coercing
> them to the length of 255 should solve the problem.
> @Brian, who wrote:
>> read.spss() is not targetted at such a recent version of SPSS, and
>> only allows variable labels of lengths 1...255.
> I can save the data in SPSS ver 7 -format, too. Is this version
> supported by the import function?

I don't know for sure: it was written ca 1998 for the PSPP project and I don't know for sure how the file format was found.

> However, the error message "error reading system-file header" gives the
> impression that the problem is somewhere else than in the overlength
> labels. Or have I understood something wrong?

It might be, which is why we need to see an example. I suspected there is more to this that just changing the limit in the read.spss internals.

> Unfortunately, I cannot make the whole data file available. I could make
> a snapshot resulting in the same error - would that be helpful?

Yes, it would.

> Kind regards,
> Kimmo

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 12 Mar 2008 - 19:18:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 21 Mar 2008 - 09:30:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive