Hello Fernando, I have two problems with you suggestion:
First what I get back if I use lowerTriangle is this: (f2.low<-lowerTriangle(f2, diag = TRUE)) [1] 0 1 1 1 1 0 1 0 0 1 1 1 1 1 0 But I need a triangle and I need an object of class dist to use afterwards the mantel.rtest function. So I think I need a possibility in as.dist to get the upper and lower triangle with the original diagonal values. But thanks for your help. Regards Birgit Am 09.10.2007 um 16:41 schrieb F.Tusell: > Birgit, > > Seems to me that > > upperTriangle > lowerTriangle > > in package gdata may be an answer to you problems. Best, ft. > -- > Fernando TUSELL e-mail: > Departamento de Econometría y Estadística [EMAIL PROTECTED] > Facultad de CC.EE. y Empresariales > Universidad del País Vasco Tel: (+34)94.601.3733 > Avenida Lendakari Aguirre, 83 Secr: (+34)94.601.3740 > E-48015 BILBAO Fax: (+34)94.601.3754 > (Spain) http://www.et.bs.ehu.es/~etptupaf > ---------------------------------------------------------------------- > > > > Birgit wrote: Hello R user! I have again a problem and sometimes I have the feeling that I will never learn to solve my problems by myself. But I found no solution in the searchable archieves or somewhere else. I have a square data.frame with distance values. In this special case the upper and the lower triangle are not the same and the diagonal is not containing zero. I need first the lower triangle including the diagonal (but not as zero) to perform a Manteltest in comparison with another triangle. I tried first as.dist and it worked very well for the lower triangle but then I became aware of the diagonal handling as zero. I found no option to get only the upper triangle including the diagonal in as.dist. Secondly i need also the upper triangle including the diagonal to perform a Manteltest. Could anybody help me with this problem. I appologise in advance, because I was to stupid to find the solution by myself. Thanks a lot. Regards Birgit Birgit Lemcke Institut für Systematische Botanik Zollikerstrasse 107 CH-8008 Zürich Switzerland Ph: +41 (0)44 634 8351 [EMAIL PROTECTED] ______________________________________________ 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.