Skip to content
Prev 77583 / 398502 Next

Problem with read.spss() and as.data.frame(), or: alternative to subset()?

The selection problem can be solved by

dr2000=read.spss('myfile')
d=lapply(dr2000,subset,dr2000$RBINZ99 > 0)

however, there is still the problem that R crashes when using

d = as.data.frame(dr2000)

or

dr2000=read.spss('myfile',to.data.frame=T)

Any suggestions why? I checked whether all components of dr2000 are of 
the same length and the sort of object of each component. This is not 
the problem: Each component has the same length (9232) and there are 66 
components of the class 'character', 981 of the class 'factor', and 479 
of the class 'numeric'.
*************************************************
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Edmund-Siemers-Allee 1
D-20146 Hamburg
Germany

phone: +49-040-42838.7498 (office)
        +49-040-42838.4591 (Billon)
fax:   +49-040-42838.2344
email: dirk.enzmann at jura.uni-hamburg.de
www: 
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html