rank_ord_switch: Switch from orderings to rankings and vice versa

Description Usage Arguments Value Author(s) Examples

View source: R/PLMIXfunctions.R

Description

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

Usage

1
rank_ord_switch(data, format_input, nranked = NULL)

Arguments

data

Numeric NxK 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 N with the number of items ranked by each sample unit.

Value

Numeric NxK data matrix of partial sequences with inverse format.

Author(s)

Cristina Mollica and Luca Tardella

Examples

1
2
3
4
## 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")

PLMIX documentation built on Sept. 4, 2019, 5:03 p.m.