powered by
Similar to head() and tail(), but returns n rows/cols from each side of x (i.e. the corners of x).
head()
tail()
n
x
corn(x, n = 2L)
x[c(1:n, N-n:N), c(1:n, N-n:N)]
matrix like object
number of cols/rows from each corner to return
corn(matrix(1:10000, 100))
Run the code above in your browser using DataLab