corner {omnibus} | R Documentation |
Corner of a matrix or data frame
Description
Return a corner of a matrix or data frame (i.e., upper left, upper right, lower left, lower right).
Usage
corner(x, corner = 1, size = 5)
Arguments
x |
Data frame or matrix. |
corner |
Integer in the set |
size |
Positive integer, number of rows and columns to return. If there are fewer columns/rows than indicated then all columns/rows are returned. |
Value
A matrix or data frame.
See Also
Examples
x <- matrix(1:120, ncol=12, nrow=10)
x
corner(x, 1)
corner(x, 2)
corner(x, 3)
corner(x, 4)
[Package omnibus version 1.2.13 Index]