kirsten
> mydata<-read.spss(file.choose(),use.value.labels = FALSE, to.data.frame = TRUE)
Warning messages:
1: C:\Documents and Settings\...\AA.sav: File-indicated character representation code (1252) looks like a Windows codepage in: read.spss(file.choose(), use.value.labels = F, to.data.frame = TRUE)
2: C:\Documents and Settings\...\AA.sav: Unrecognized record type 7, subtype 16 encountered in system file in: read.spss(file.choose(), use.value.labels = FALSE, to.data.frame = TRUE)
What happened?
kirsten
this msg sometimes jumps out, but sometimes doesn't. shall I just ignore it? will it have any influent on my analyse?
yihui
建议不要直接读SPSS数据,即使foreign包中有read.spss()函数。
把数据转换为任何软件都可以读的通用格式,比如ASCII格式(*.txt,*.csv等),这样处理起来会方便很多。商业软件不开源,贸然去直接读指不定就出什么问题。
sociology
Just wield guess.
Maybe cos' your variable name contains Chinese characters.
kirsten
haven't try .txt.
but i don't think .csv will suit my situation. cos my dataset is too large to fit in a excel datasheet.
my variable names are all english... are there any characters not allowed in variable names such as "_" or "$"? I'm not sure if it has those symbols included...
yihui
MS Office真是毒害人啊……在Windows系统上,若安装了Excel,则*.csv文件默认会用Excel打开,这样使人误以为csv就是Excel文件,其实它和Excel毫无关系,就是一个ASCII文件,数据用逗号分隔而已。
大数据只要内存能承受就能读进来。read.csv()
kirsten
i see...
thanks a lot!
netcow
经验之谈,值得重视。