[R] matrix similarity comparison

Carlos Guerra carlosguerra at esa.ipvc.pt
Mon Mar 19 17:37:15 CET 2007


Let me see if I can explain my problem better,

I have:

m1 <- matrix(c(1,0,0,0,1,0,1,1,1,1,1,1), 3, 4)
rownames(m1) <- c("station1", "station2", "station3")
colnames(m1) <- c("A","B","C","D")

m2 <- matrix(c(1,0,1,1,1,0,1,1,0,0,1,1), 3, 4)
rownames(m2) <- c("station1", "station2", "station3")
colnames(m2) <- c("A","B","C","D")

... and I want to:
- find the correlation between the two matrices
- for each station, extract the names of the columns that don't match in 
the two matrices

Thanks for the previous comments,
Carlos

-- 
Carlos GUERRA

Gabinete de Sistemas de Informacao Geografica
Escola Superior Agraria de Ponte de Lima
Mosteiro de Refoios do Lima
4990-706 Ponte de Lima

Tlm: +351 91 2407109
Tlf: +351 258 909779

Reclaim your Inbox...!!!
http://www.mozilla.org/products/thunderbird/



More information about the R-help mailing list