mhead: Get head of 2 dimensional object as a square block

View source: R/utils.R

mheadR Documentation

Get head of 2 dimensional object as a square block

Description

head prints all columns which may flood the console, mhead takes a square block which can look nicer and still provide a good inspection of the contents

Usage

mhead(x, n = 6)

Arguments

x

the object with 2 dimensions

n

the size of the n-by-n block to extract

Value

an n-by-n sized subset of x

Examples

x <- matrix(runif(100), nrow = 10, ncol = 10)

mhead(x)
mhead(x, n = 3)

Shians/CellBench documentation built on Oct. 16, 2023, 7:54 a.m.