tabul - frequency of values of a matrix or vector

Calling Sequence

[m]=tabul(x)

Parameters

Description

This function computes the frequency of values of the components of a numerical o chain of characters vector or matrix x.

If x is a numerical vector or matrix, m is a two column matrix who contains in the first column the values of x sorted in descending order and in the other column there is the number of occurrences of the corresponding value in x.

If x is composed of chains of characters, m is a list whose first member is a string vector composed with the values of x and the second member is a vector whose components are the number of occurrences of each value in x.

Examples

Author

Bibliography

Wonacott, T.H. & Wonacott, R.J.; Introductory Statistics, fifth edition, J.Wiley & Sons, 1990.