search for: index_i

Displaying 2 results from an estimated 2 matches for "index_i".

Did you mean: index_0
2002 Feb 20
3
Feature Request: "matrix[1:10,1:10, block=F] <- 1:10"
Hi Guys, I've again been surprised when something like > m <- matrix("", nrow=3,ncol=3) > index_i <- c(2,1,3) > index_j <- c(1,3,2) > vals <- c("a","b","c") > m[ index_i, index_j ] <- vals > m gives block-wise application of the assignment: [,1] [,2] [,3] [1,] "b" "b" "b" [2,] "a" "a...
2002 Feb 20
1
Bug in "[<-.matrix"? (Was: Feature Request: "matrix[1:10,1:10, block=F] <- 1:10")
...arnes@groton.pfizer.com > Cc: r-devel@hypatia.math.ethz.ch > Subject: [Rd] Feature Request: "matrix[1:10,1:10, block=F] <- 1:10" > > > Gregory R Warnes <gregory_r_warnes@groton.pfizer.com> wrote: > R> m <- matrix("", nrow=3,ncol=3) > R> index_i <- c(2,1,3) > R> index_j <- c(1,3,2) > R> vals <- c("a","b","c") > R> m[ index_i, index_j ] <- vals > > but what he wants to get is: > > [,1] [,2] [,3] > > [1,] "" "" "b" &...