Currently, I have two matrixes, and want to compare it and see whether they are exactly equivalent. In R, is there any function to do that?
As stated above start with ?all.equal or ?identical. If you then find that your matrices are unequal, you may want to compare them column by column. This might do the trick:
?all.equal
?identical
mapply(as.data.frame(m1),as.data.frame(m2),FUN=function(v1,v2) all(v1==v2) )