Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] almost lower triangular matrices

Michael Anyadike-Danes

2005-03-01

Replies:

I have output from a program which produces a distance matrix I want to
read into a clustering program in R.



The output is a .txt file and is 'almost' lower triangular in the sense
that it is just the triangle below the diagonal.



So for example a 4-by-4 distance matrix appears as,



1

2 3

4 5 6



i.e. it looks like a lower triangular of a 3-by3.



I thought I might be able to use "diag" to add zeros but apparently not.



It's a problem because my matrix is actually 1989-by-1989 not 4-by-4



I would not be at all surprised if the solution is obvious but I cannot
quite see how to read this into R.



Michael Anyadike-Danes

Economic Research Institute of Northern Ireland






 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.