Returns an array of the same number of dimensions as the input, but generally with smaller dimensions.
corner(x, corner = "tlffff", n = rep(6, length(corner)))
x |
an array. |
corner |
a single character string which codes the particular corner of the array that is desired. The first character is either "t" (top) or "b" (bottom). The second character is either "l" (left) or "r" (right). Remaining characters should be either "f" (front) or "b" (back). |
n |
a vector of positive integers which should have length
at least that of the dim of the array.
This states (the maximum of) each of the dimensions of the result.
|
an array similar to the input x, but with smaller dimensions in general.
This presumes that head and tail are available if called
on 1-dimensional arrays or non-array objects.
Patrick Burns
data(freeny) # R command, not for S-PLUS corner(freeny.x) corner(freeny.x, "br", c(2,2)) # R example data(iris3) corner(iris3) # S-PLUS example corner(iris)