I\'m very surprised this question has not been asked, maybe the answer will clear up why. I want to compare rows of a matrix to a vector and return whether the row == the v
Using DeMorgan's rule (Not all = Some not), then All equal = Not Some Not equal, we also have
!colSums(t(M) != v)