Learn R Programming

Rankcluster (version 0.98.0)

frequence: Convert data storage

Description

This function takes in input a matrix containing all the observed ranks (a rank can be repeated) and returns a matrix containing all the different observed ranks with their observation frequencies (in the last column).

Usage

frequence(X, m = ncol(X))

Value

A matrix containing each different observed ranks with its observation frequencies in the last column.

Arguments

X

a matrix containing ranks.

m

a vector with the size of ranks of each dimension.

Author

Quentin Grimonprez

See Also

unfrequence

Examples

Run this code
X <- matrix(1:4, ncol = 4, nrow = 5, byrow = TRUE)
Y <- frequence(X)
Y

Run the code above in your browser using DataLab