Skip to content
Prev 121075 / 398500 Next

Creating a cross table out of a large dataset

On Thu, 2007-07-26 at 13:32 -0700, celine wrote:
A wild guess here, but it sounds like your data does not likely contain
a relatively small set of repeated discrete entries.

Thus, your cross-tabulation results in a large number of combinations,
the number of which exceeds the largest representable integer in R,
which is:
[1] 2147483647

or
[1] 2147483647


An R table is a two (or possibly more) dimension matrix with additional
class attributes.  A matrix is in turn, a vector with 'dim' attributes.
A vector is indexed using integers and thus is limited in size to the
above number.

If the above assumptions are correct, I am struggling to think of a
scenario where the visual representation of a cross-tabulation of your
data will be of value, but that may be just do to a severe lack of sleep
of late.

You might want to run:

 length(unique(Dataset$K1))

and 

  length(unique(Dataset$K2))

which will tell you how many unique values are in each of the two
vectors. That will begin to give you some idea as to what you are
dealing with.

HTH,

Marc Schwartz