corner: corner, an improved head()

Description Usage Arguments Value Author(s) Examples

View source: R/corner.R

Description

Returns the first part of an object similar to head() but subsets columns as well as rows, and also handles lists of objects.

Usage

1
corner(mat, n = 6)

Arguments

mat

A DataFrame, data.frame, GRanges, matrix, tibble, or list

n

Integer number of rows and columns you want returned

Value

An n x n object of the original class (or a list of n nxn objects)

Author(s)

Emily E. Burke

Examples

1
2
3
4
5
m <- matrix(rnorm(1000), ncol = 10)
corner(m)

lis <- list(iris, mtcars, matrix(rnorm(1000), ncol = 10))
corner(lis)

LieberInstitute/jaffelab documentation built on Aug. 15, 2018, 4:37 a.m.