corner: Portion of an Array or Data Frame

Description Usage Arguments Value See Also Examples

Description

Returns an array (or data frame) of the same number of dimensions as the input, but generally with smaller dimensions.

Usage

1
  corner(x, corner = "tlffff", n = 6)

Arguments

x

an array (which includes matrices) or data frame.

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 generally should have length at least that of the dim of the array – it is replicated if not. This states (the maximum of) each of the dimensions of the result.

Value

an array similar to the input x, but with smaller dimensions in general.

See Also

head, tail.

Examples

1
2
3
4
5
6
  corner(freeny.x)
  corner(freeny.x, "br", c(2,3))

  # with three-dimensional arrays:
  corner(iris3)
  corner(array(1:1000, rep(10, 3)), "brf", 2:4)

BurStMisc documentation built on May 2, 2019, 12:12 p.m.

Related to corner in BurStMisc...