powered by
Convert the format of the input dataset from orderings to rankings and vice versa.
rank_ord_switch(data, format_input, nranked = NULL)
Numeric \(N\)\(\times\)\(K\) data matrix of partial sequences with inverse format.
Numeric \(N\)\(\times\)\(K\) data matrix of partial sequences whose format has to be converted.
Character string indicating the format of the data input, namely "ordering" or "ranking".
data
"ordering"
"ranking"
Optional numeric vector of length \(N\) with the number of items ranked by each sample unit.
Cristina Mollica and Luca Tardella
## From orderings to rankings for the Dublin West dataset data(d_dublinwest) head(d_dublinwest) rank_ord_switch(data=head(d_dublinwest), format_input="ordering")
Run the code above in your browser using DataLab