[R] problem with lower, upper triangles and diagonal

Birgit Lemcke birgit.lemcke at systbot.uzh.ch
Tue Oct 9 16:29:14 CEST 2007


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
birgit.lemcke at systbot.uzh.ch



More information about the R-help mailing list