headhead: head/tail function for matrix or data.frame

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/headtail.R

Description

These two functions reassembles head and tail, showing the first rows and columns of 2D data structures, e.g. matrix or data.frame.

Usage

1
headhead(x, m = 6L, n = 6L)

Arguments

x

A data.frame or matrix

m

Integer, number of rows to show

n

Integer, number of columns to show

Details

While head and tail can be applied to data.frame or matrix as well, they show all columns of the first (last) rows even if the matrix has a large number of columns. These two function, headhead and tailtail, circumvent this problem by showing only the first rows AND the first columns.

Value

The first rows/columns of the input object

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>

See Also

head, tail

Examples

1
2
3
4
myMat <- matrix(rnorm(10000), nrow=10L)
head(myMat)
headhead(myMat)
tailtail(myMat)

ribiosUtils documentation built on March 13, 2020, 2:54 a.m.