R/rowMatch.R

Defines functions rowMatch

rowMatch <-
function(vector, matrix){
  if (length(vector) == 1) return(match(vector, matrix))
  for (i in 1:nrow(matrix)){
    if (sum(vector == matrix[i,]) == length(vector))
      return(i)
  }
  return(NA)
}
BANOVAapp/BANOVA_R documentation built on May 3, 2021, 6:30 a.m.