Re: [R] indexing an array using an index-array, but one entry being ', '

2005-04-19 Thread Christoph Lehmann
OK, the hint by Dimitris applied I just do very simple: test <- array(c(1:16), dim = c(3,4,3)) test ## I call some enries using an index array test.ind <- array(rbind(c(1,2,1), c(3,3,2)), dim = c(2,3)) test[test.ind] ## suppose I want all values in the 2nd row and 4th col over ## all three 3rd dime

Re: [R] indexing an array using an index-array, but one entry being ', '

2005-04-19 Thread Dimitris Rizopoulos
MAIL PROTECTED]> To: Sent: Tuesday, April 19, 2005 3:11 PM Subject: [R] indexing an array using an index-array, but one entry being ', ' Hi I have the following array: test <- array(c(1:16), dim = c(3,4,3)) test ## I call some enries using an index array test.ind <- array(rbind(c

[R] indexing an array using an index-array, but one entry being ', '

2005-04-19 Thread Christoph Lehmann
Hi I have the following array: test <- array(c(1:16), dim = c(3,4,3)) test ## I call some enries using an index array test.ind <- array(rbind(c(1,2,1), c(3,3,2)), dim = c(2,3)) test[test.ind] ## suppose I want all values in the 2nd row and 4th col over ## all three 3rd dimensions test[2,4,] how to