headl: Head/tail left/right

View source: R/short_functions.R

headlR Documentation

Head/tail left/right

Description

Functions to view the top/bottom left/right corners of large matrices or data frames.

Usage

headl(x, m = 6L, n = 6L)

headr(x, m = 6L, n = 6L)

taill(x, m = 6L, n = 6L)

tailr(x, m = 6L, n = 6L)

Arguments

x

A matrix or data frame.

m

The number of rows to view. Default: 6.

n

The number of columns to view. Default: 6.

Value

A matrix of size m x n.

Examples

mat <- matrix(1:900, 30, 30)
headl(mat)
tailr(mat)
headl(mat, 10, 5)
headl(as.data.frame(mat))

m20ty/matkot documentation built on July 1, 2023, 8:11 p.m.