corn: Return Corners of Matrix like Objects

View source: R/live.R

cornR Documentation

Return Corners of Matrix like Objects

Description

Similar to head() and tail(), but returns n rows/cols from each side of x (i.e. the corners of x).

Usage

corn(x, n = 2L)

Arguments

x

matrix like object

n

number of cols/rows from each corner to return

Value

x[c(1:n, N-n:N), c(1:n, N-n:N)]

Examples

corn(matrix(1:10000, 100))

toscutil documentation built on June 28, 2024, 5:06 p.m.

Related to corn in toscutil...