R/get_indices.R

Defines functions get_indices

Documented in get_indices

#' Determine Indices of Ranked Objects
#'
#' @description Used in \emph{Subiterative Convergence} to determine the index of
#' the subset of objects from the output from \emph{Modified Kemeny}. These indices
#' are then used to find the object indices for the next step in \emph{Subiterative Convergence}.
#'
#' @param x a vector of integers, typically a series from 1 to \eqn{\eta}{eta} from \emph{Subiterative Convergence}.
#'
#' @param y a vector containing the ranking, typically the output from \emph{Modified Kemeny}.
#'
#' @return The index or indices of the ranked objects.
#'
#' @seealso \code{\link{subit_convergence}}
#'
#' @keywords internal
#'
#' @export

get_indices <- function(x, y) {
  which(y == x)
}

Try the RankAggSIgFUR package in your browser

Any scripts or data that you put into this service are public.

RankAggSIgFUR documentation built on July 9, 2023, 7:26 p.m.