Skip to content
Prev 68010 / 398506 Next

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

in the specific example you could consider something like this:

test <- array(c(1:16), dim = c(3,4,3))
##
test.ind <- rbind(c(2,4,1), c(2,4,2), c(2,4,3))
test[test.ind]
test[2,4,]

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Christoph Lehmann" <christoph.lehmann at gmx.ch>
To: <R-help at stat.math.ethz.ch>
Sent: Tuesday, April 19, 2005 3:11 PM
Subject: [R] indexing an array using an index-array, but one entry 
being ', '