Skip to content
Prev 178270 / 398506 Next

omit empty cells in crosstab?

I think the easiest way to deal with this problem is
to paste together the values, use table on those, and
then unpaste (strsplit) them back.  Using the 10 columns
with 10 levels example:
X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 Freq
1   10  8  3  3  5  9  9  6  5   2    1
2    1  1  3  6  2  7  7  7  1  10    1
3    2  6  6  8  9  7  2  8  6   3    1
4    2  7  1  2  2  4  3  4  3   2    1
5    3  5  2  3  6  3  4  7  6   7    1
6    4  1  9 10  2  9  6  1  4   1    1
7    4  2  5  8  2  2  1  4  6   3    1
8    4  8  4  8  2  9  2  3  4   1    1
9    5 10  3 10  1  2  1  9  7  10    1
10   7  5  9  6  6  5  2  5  7   2    1
11   7  6  4  4  8  3  8  8 10   6    1
12   9  2  6  2  8  7  5  4  2   1    1

                                        - Phil Spector
 					 Statistical Computing Facility
 					 Department of Statistics
 					 UC Berkeley
 					 spector at stat.berkeley.edu
On Fri, 24 Apr 2009, sjaffe wrote: