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). |
library("stats") x=read("drosop") table2(x[,6:7])
realizations and crosstable of the columns x[,6:7]