[R-sig-eco] How to change a coefficient matrix into a semi-matrix?

Jari Oksanen jari.oksanen at oulu.fi
Sun Aug 30 18:07:06 CEST 2009




On 30/08/2009 17:26, "Zongshan, Li" <zsli_st at rcees.ac.cn> wrote:

> Dear all of r-sig-ecology:
> 
> I have a coefficient matrix produced by Phylocom, for example:
>       plot1       plot2       plot3       plot4       plot5
> plot1       245.76    258.94    252.88    254.23    249.19
> plot2       258.94    269.58    264.39    265.55    261.85
> plot3       252.88    264.39    259.87    260.42    256.30
> plot4       254.23    265.55    260.42    262.75    257.44
> plot5       249.19    261.85    256.30    257.44    254.01
> I want to do the hierarchical cluster analysis in R with the funtion: hclust,
> but the format of input data of hclust is semi-matrix, for example:
>       plot1       plot2       plot3       plot4
> plot2       258.94
> plot3       252.88    264.39
> plot4       254.23    265.55    260.42
> plot5       249.19    261.85    256.30    257.44
>  
> Is there some function in R to change a matrix into the format of semi-matrix?
> Thanks a lot! Best regards to all of you!
> 

Zongshan,

Gav already told  you about 'as.dist'. Here some more news: check the
'picante' package which is Phylocom in R.

cheers, jari oksanen



More information about the R-sig-ecology mailing list