Learn R Programming

PLMIX (version 2.1.1)

freq_to_unit: Individual rankings/orderings from the frequency distribution

Description

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

Usage

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 \(N\)\(\times\)\(K\) data matrix of observed individual sequences.

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab