Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: stats
See also: crosstable discrete

Quantlet: table2
Description: computes a two way table from two-dimensional data.

Usage: {x1,x2,t}=table2(x)
Input:
x n x 2 matrix, the columns correspond to the variables.
Output:
x1 p x 1 vector, distinct realizations of x[,1].
x2 q x 1 vector, distinct realizations of x[,2].
t p x q matrix, the absolute frequencies (the inner part of the crosstable).

Example:
library("stats")
x=read("drosop")
table2(x[,6:7])

Result:
realizations and crosstable of the columns x[,6:7]



Author: M. Mueller, 19970325
(C) MD*TECH Method and Data Technologies, 05.02.2006