[R] comparing matrices

Esmail esmail.js at gmail.com
Sun Apr 26 19:31:41 CEST 2009


ONKELINX, Thierry wrote:
> Have a look at all.equal
> 
> matA <- matrix(1:4, ncol = 2)
> matB <- matA
> all.equal(matA, matB)
> matB[1,1] <- -10
> all.equal(matA, matB)

Hi Thierry,

Thanks, all.equal does indicate if it's all equal so that
works great!

Much nicer than my hack - thanks,

Esmail




More information about the R-help mailing list