search for: meshdom

Displaying 1 result from an estimated 1 matches for "meshdom".

Did you mean: meshbox
2003 Aug 23
1
filling a matrix who's entries are a function of the indices?
Dear R list, What's the best way in R to fill a matrix who's entries depend on some function of the indices? I'm currently doing: Q <- matrix(0, k, k) for (A in 1:k) { for (B in 1:k) { Q[A,B] <- my.function(A,B) } } but I wonder if there is a more terse way. Regards, Douglas Scofield Department of Biology d.scofield at