Hey,

You could also use (after initializing x):

x[lower.tri(x)] <- data$k
x <- t(x)

Cheers,

Tsjerk

On Feb 16, 2012 6:59 PM, "Rui Barradas" <rui1174@sapo.pt> wrote:

Hello,

I'm glad it helped.

The difference in the ordering is due to the fact that R defaults to
column-first ordering.
David's solution uses row-first  (which is what you wanted).

Rui Barradas


--
View this message in context:
http://r.789695.n4.nabble.com/built-a-lower-triangular-matrix-from-dataframe-tp4390813p4394543.html

Sent from the R help mailing list archive at Nabble.com.
__________________________________________...

	[[alternative HTML version deleted]]

