Hello all, 

I am wondering if there is anyway to create distance matrix for replicated
data

for example, 

I have a data like

sample  pop     id      var1    var2    var3    var4
1.1     1       a       1       1       0       1
1.2     1       a       0       0       1       0
1.3     1       a       1       1       0       1
2.1     2       b       0       0       1       0
2.2     2       b       1       1       1       1
2.3     2       b       0       1       0       0
2.4     2       b       1       0       1       1
3.1     3       a       0       1       0       1
3.2     3       a       1       1       1       0
3.3     3       a       0       0       0       0


dist(data[,c(4:7)] gives the distance of samples, but I also need the
distances of pop ie (1,2,3) and also id (a,b) how can I achieve this??

Thanks


      

--
View this message in context: 
http://r.789695.n4.nabble.com/distance-matrix-tp3498033p3498033.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to