# some data:
male <- c(33, 76, 6);
female <- c(47, 153, 25);
mat <- cbind( male, female );
rownames(mat) <- c( 'good', 'satisfactory', 'bad');
calc.TT(mat);
# long format
long = untable(mat);
calc.TT(long$Var1, long$Var2)
Run the code above in your browser using DataLab