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)
}

Try the BANOVA package in your browser

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

BANOVA documentation built on June 21, 2022, 9:05 a.m.