cornerMat: Show the corner of a matrix

Description Usage Arguments Value Examples

View source: R/myBasicFunctions.R

Description

Show the corner of a matrix

Usage

1
cornerMat(matrix, size = 5, corner = "topleft", method = "minmax")

Arguments

matrix

a matrix or a dataframe

size

the size to display (default is 5)

corner

the corner to display ("topleft", "topright", "bottomleft", or "bottomright"), default is "topleft"

method

the method to select the top or bottom, default is 'minmax', can also be 'headtail'.

Value

a matrix or a dataframe 'size' by 'size'.

Examples

1
2
3
4
5
myHugeMatrix <- matrix(1:10000, nrow = 100)
cornerMat(myHugeMatrix, 10)
cornerMat(myHugeMatrix, 3, "bottomleft")
mySmallMatrix <- matrix(1:9, nrow = 3)
cornerMat(mySmallMatrix)

lldelisle/usefulLDfunctions documentation built on Nov. 29, 2021, 5:40 a.m.