Examples for 'abind::asub'


Arbitrary subsetting of array-like objects at specified indices

Aliases: asub asub.default

Keywords: manip array

### ** Examples

x <- array(1:24,dim=c(2,3,4),dimnames=list(letters[1:2],LETTERS[1:3],letters[23:26]))
asub(x, 1, 1, drop=FALSE)
, , w

  A B C
a 1 3 5

, , x

  A B  C
a 7 9 11

, , y

   A  B  C
a 13 15 17

, , z

   A  B  C
a 19 21 23
asub(x, list(1:2,3:4), c(1,3))
, , y

   A  B  C
a 13 15 17
b 14 16 18

, , z

   A  B  C
a 19 21 23
b 20 22 24

[Package abind version 1.4-5 Index]