peek: Get a random sample from a data object

Description Usage Arguments Value Examples

View source: R/peek.R

Description

Analogous to head and tail, but takes a random sample of rows to display and prints them in order

Usage

1
peek(x, n = 6L)

Arguments

x

a vector, matrix, or data.frame

n

an integer specifying the number of elements (vector) or rows (matrix/data.frame) to display

Value

a random subset of x. Elements will be in the same order as in x, and output is of the same class as x.

Examples

1
2
3
4
5
## Not run: 
set.seed(123);
 peek(USArrests)
 
## End(Not run)

nickfishbane/fishyTools documentation built on May 23, 2019, 4:47 p.m.