On Wed, Mar 11, 2009 at 11:49 PM, Sundar Dorai-Raj <sdorairaj at gmail.com> wrote: > Does this help? > > A <- matrix(0, 6, 6) > vec <- 1:5 > A[row(A) == col(A) + 1] <- vec Maybe, more simply: A <- matrix(0, 6, 6) vec <- 1:5 diag(A[-1,]) <- vec Paul