peek: Peek inside a matrix or vector

Description Usage Arguments Value Examples

View source: R/manip.R

Description

Peek is a simple utility to conveniently look at a portion of a matrix. This is similar to head and tail but provides a 2-dimensional slice instead of a complete row. This is useful for debugging and inspecting matrices.

Usage

1
peek(x, upper = 5, lower = 1)

Arguments

x

Any object that supports subsetting

upper

The upper bound in the subsetting

lower

The lower bound in the subsetting

Value

A subset of the original matrix, data.frame, etc.

Examples

1
2
m <- matrix(c(1,3,4,2, 5,10,11,2, 3,42,8,22, 23,15,3,8), ncol=4)
peek(m, 2)

zatonovo/futile.matrix documentation built on May 4, 2019, 9:11 p.m.