Skip to content
Prev 77594 / 398502 Next

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

Dirk> The selection problem can be solved by
    Dirk> dr2000=read.spss('myfile')
    Dirk> d=lapply(dr2000,subset,dr2000$RBINZ99 > 0)

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

    Dirk> d = as.data.frame(dr2000)

which is bug in a R, or at least in your R installation.

However we can't do anything about it at the moment, because we
can't even try to do reproduce it...

So dr2000 is a list; what length() does it have?, what names() ?
what does str(dr2000) look like?

What does happen for  as.data.frame(dr2000[1:10]) ?
and '100' or '1000' instead of '10'?

Maybe try to find a small version of 'dr2000' which still has
the problem, and show us that one,
e.g. by making it available via http://... if it is still large,
otherwise (if it's small), maybe even posting the result of
dump(..).

Regards,
Martin