Re: [R] variable names from SPSS data base

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Wed 10 May 2006 - 03:17:04 EST

On Tue, 9 May 2006, SUBIRANA CACHINERO, ISAAC wrote:

> Hi R-users,
>
> When I import a data base from SPSS with some variable with a name of
> more than 8 characters (which is possible in version 12 or later of SPSS
> software) I find that the name of these variables have been truncated to
> 8 characters. I used the 'read.spss' function from the 'foreign'
> package.

They have not been truncated by R. R reads the short variable names that SPSS stores

There is no code in R to read the long variable names, or AFAIK any plans to write any -- it isn't a high priority for the people who wrote read.spss. The basic C code needed is in the GNU PSPP program, but it would take some effort to extract it and put it in the foreign package. I understand that SPSS also makes code available for reading SPSS files now, and that could be used instead. We would welcome well-tested patches to read.spss, but I don't think it will happen any other way.

         -thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 10 03:29:36 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 10 May 2006 - 04:09:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.