rank_ord_switch function

Switch from orderings to rankings and vice versa

Switch from orderings to rankings and vice versa

Convert the format of the input dataset from orderings to rankings and vice versa.

rank_ord_switch(data, format_input, nranked = NULL)

Arguments

  • data: Numeric N$$x$$K data matrix of partial sequences whose format has to be converted.
  • format_input: Character string indicating the format of the data input, namely "ordering" or "ranking".
  • nranked: Optional numeric vector of length NN with the number of items ranked by each sample unit.

Returns

Numeric N$$x$$K data matrix of partial sequences with inverse format.

Examples

## 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")

Author(s)

Cristina Mollica and Luca Tardella

  • Maintainer: Cristina Mollica
  • License: GPL (>= 2)
  • Last published: 2019-09-04

Useful links