Skip to content
Prev 170771 / 398506 Next

frequency table for multiple variables

on 02/17/2009 09:06 AM Hans Ekbrand wrote:
1 2 3 4 5
var1 0 3 2 2 0
var2 1 3 1 2 0
var3 0 0 4 1 1


The key is to turn each column into a factor with explicitly defined
common levels for tabulation. This enables the table result to have a
consistent format across each column, allowing for a matrix to be
created, rather than a list.

HTH,

Marc Schwartz