freq_to_unit: Individual rankings/orderings from the frequency distribution

Description Usage Arguments Value Author(s) Examples

View source: R/PLMIXfunctions.R

Description

Construct the dataset of individual rankings/orderings from the frequency distribution of the distinct observed sequences.

Usage

1
freq_to_unit(freq_distr)

Arguments

freq_distr

Numeric matrix of the distinct observed sequences with the corresponding frequencies indicated in the last (K+1)-th column.

Value

Numeric NxK data matrix of observed individual sequences.

Author(s)

Cristina Mollica and Luca Tardella

Examples

1
2
3
4
5
6
library(gtools)
K <- 4
perm_matrix <- permutations(n=K, r=K)
freq_data <- cbind(perm_matrix, sample(1:factorial(K)))
freq_data
freq_to_unit(freq_distr=freq_data)

cmollica/PLMIX documentation built on Dec. 31, 2020, 10:04 p.m.