Skip to content
Prev 156539 / 398506 Next

frequency table across multiple variables

The following will work IF all columns are integer:
x1 x2 x3
[1,]  5  0  5
[2,]  3  3  5
[3,]  3  5  4
[4,]  3  5  3

Please note that the result will look slightly different, if some columns contain 
the largest value and others don't:
$x1
[1] 5 3 3 2 1

$x2
[1] 0 3 5 5

$x3
[1] 5 5 4 3


cu
	Philipp