[R] ""Error in table(data) : attempt to make a table with >= 2^31 elements""
David Winsemius
dwinsemius at comcast.net
Tue Aug 28 14:13:16 CEST 2012
On Aug 28, 2012, at 4:10 AM, Panagiwta Zygoura wrote:
>
>
>
>
> Hi im new in the mailing list, i am trying to apply a loglinear
> model at my data in order to seek for significant correlations and
> effects. i have 27 variables kai 146 observations. I want to make a
> contingency table for this data set in R and i write
> table(data) but it doesn't work and appears this error message:
>
> Error in table(data) : attempt to make a table with >= 2^31 elements
>
> How can i fix this?
You could try being a little less greedy in your expectations. You
have asked for a table of all 27 variables cross-tabulated by each
other all at once. That is a 27 dimensional table. What sort of
contingency table did you really want?
Perhaps:
lapply(data, table) # which should give you one-way tabulations of
each variable.
--
David Winsemius, MD
Alameda, CA, USA
More information about the R-help
mailing list