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

Thomas Lumley tlumley at u.washington.edu
Sat Sep 24 01:00:49 CEST 2005


On Wed, 21 Sep 2005, Martin Maechler wrote:

>>>>>> "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...

I suspect this is the same stack overflow in coerce.c:substituteList that 
was reported in PR#8141

 	-thomas






>
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list