Impressive! PSPP produces the sav fine. The sav file produced by the PSPP is seen by SPSS (16) with the long names.
I attach my sav produced by the PSPP. And I start to suspect my foreign package version: I am using 0.8.26-1 from the r-cran-foreign a Ubuntu 8.10 package. Can you tell me your version? I am updating mine. Thanks guys. Caveman On Thu, Oct 15, 2009 at 9:02 PM, Robert Baer <rb...@atsu.edu> wrote: >>>>>> The problem is the limit of 8 characters long on variable >>>>>> names.[in read.spss??????] > > I just created a file in SPSS 17 and saved it in standard format (.sav) The > file had four unique variable NAMES which were much longer than 8 characters > (although not 64). I entered two rows of data and saved the file again. The > "variable view" in SPSS looked like the following for the 4 variables I > created. (unique in the first postition after the first 9) > > a12345678901234567890987654321098765432011111111111111 Numeric 8 2 > a1234567890 None None 14 Right Scale > a1234567899123456789098765432109876543201 Date 9 0 b1234567890 None None 14 > Right Scale > a1234567898123456789098765432109876543201 String 8 0 c1234567890 None None > 14 Left Nominal > a1234567897123456789098765432109876543201 Numeric 8 2 d1234567890 None None > 14 Right Scale > > I now started R and used read.spss() from the foreign package using the > following code" The data frame I read in seemed to reflect the original > file with respect to column names: > >> library(foreign) >> c=read.spss(file.choose(),to.data.frame=TRUE) >> c > > a12345678901234567890987654321098765432011111111111111 > a1234567899123456789098765432109876543201 > a1234567898123456789098765432109876543201 > 1 33.3 13452825600 > a cat > 2 22.2 13463280000 > dog > a1234567897123456789098765432109876543201 > 1 32165 > 2 321654987 > > It appears these long variable names read in just fine. Thus, I would ask > caveman whether the problem is really an R problem at all, or is it a > problem with PSPP writing (in which case this would be the wrong list to be > discussing it on)? > > R >
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.