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

Martin Maechler maechler at stat.math.ethz.ch
Wed Sep 21 15:04:03 CEST 2005


>>>>> "Dirk" == Dirk Enzmann <dirk.enzmann at jura.uni-hamburg.de>
>>>>>     on Wed, 21 Sep 2005 13:18:32 +0200 writes:

    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




More information about the R-help mailing list