frequence function

Convert data storage

Convert data storage

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).

frequence(X, m = ncol(X))

Arguments

  • X: a matrix containing ranks.
  • m: a vector with the size of ranks of each dimension.

Returns

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

Examples

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

See Also

unfrequence

Author(s)

Quentin Grimonprez

  • Maintainer: Quentin Grimonprez
  • License: GPL (>= 2)
  • Last published: 2022-11-12

Useful links