Examples for 'abind::acorn'


Return a corner of an array object (like head)

Aliases: acorn ahead acorn.default

Keywords: manip array

### ** Examples

x <- array(1:24,dim=c(4,3,2),dimnames=rev(list(letters[1:2],LETTERS[1:3],letters[23:26])))
acorn(x)
, , a

  A B  C
w 1 5  9
x 2 6 10
y 3 7 11
z 4 8 12
acorn(x, 3)
, , a

  A B  C
w 1 5  9
x 2 6 10
y 3 7 11
acorn(x, -3)
, , a

  A B  C
x 2 6 10
y 3 7 11
z 4 8 12
acorn(x, 3, -2)
, , a

  B  C
w 5  9
x 6 10
y 7 11

[Package abind version 1.4-5 Index]