我正在尝试使用 read.spss 将 SPSS 文件读入 R。这是一个非常大的文件(世界价值观调查),大约有 67k 条目。
这是代码,有错误:
> library(foreign)
> wvs = read.spss("C:/wvs2005_v20090901a.sav",to.data.frame=TRUE)
Warning messages:
1: In read.spss("C:/wvs2005_v20090901a.sav", to.data.frame = TRUE) :
C:/wvs2005_v20090901a.sav: Unrecognized record type 7, subtype 8 encountered in system file
2: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
3: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
4: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
5: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
6: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
7: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
8: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
9: In `levels<-`(`*tmp*`, value = c("Missing; Unknown", "Not asked", :
duplicated levels will not be allowed in factors anymore
非常感谢任何见解。