% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrapper_mdu.R
\name{make_bw_from_ydif}
\alias{make_bw_from_ydif}
\alias{restore_bw_from_ydif}
\title{Make Best and Worst Responses from Best-Worst Pair Indices}
\usage{
make_bw_from_ydif(Y_dif, sets)

restore_bw_from_ydif(Y_dif, sets)
}
\arguments{
\item{Y_dif}{Matrix or data frame of pair indices (N persons x P tasks).
Each value must be an integer from 1 to `C * (C - 1)`, where `C` is the
number of items per task.}

\item{sets}{Matrix or data frame of presented item sets (P tasks x C items).}
}
\value{
A list with two data frames: `Best` and `Worst`.
}
\description{
Converts a matrix of Best-Worst pair indices (`Y_dif`) into separate `Best`
and `Worst` data frames. The returned values are positions within each row of
`sets`, not the item labels stored in `sets`.
}
