Thank you very much, arun kirshna! That's it! I only modified the "res1<-apply(toeplitz(dat1[,2]),1,function(x) 10-x)" for "res1<-apply(toeplitz(dat1[,2]),1,function(x) dat1[1,2]-x)" and worked very well!
Thanks again! -- View this message in context: http://r.789695.n4.nabble.com/matrix-of-all-difference-between-rows-values-tp4649191p4649196.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.