R/getAssignments.R

Defines functions getAssignments

Documented in getAssignments

#' Functions to identify reviewer-applicant pairs from incomplete block design
#'
#' @param x A design generated by `assignReviewers()`
#' @param appNames A vector of applicant names
#' @return A matrix of applicant assignments. Each row corresponds with the applicants assigned to each reviewer, so the number of rows should correspond with the number of reviewers. The number of columns corresponds to the parameter `alternatives.per.block` used in `assignReviewers()`.
#' @examples
#' \dontrun{
#' s.des.names = getAssignments(x = student.design,
#'                              appNames = applicantNames)
#' }
#' @export
# 


# A function to extract the reviewer assignments from the incomplete block design. Here, x is a design generated from incomplete.block.design(). 
getAssignments = function(x, appNames){
  myDesign = t(x$design)
  # fill in applicant names to student reviewer and faculty reviewer tables
  myDesNames = apply(myDesign,
                     MARGIN = c(1,2),
                     FUN = nameFinder,
                     applNames = appNames)
  return(myDesNames)
}
ggeDCAA/ggeAdmit documentation built on Jan. 18, 2022, 9:02 p.m.