psych (version 1.6.12)

headTail: Combine calls to head and tail

Description

A quick way to show the first and last n lines of a data.frame, matrix, or a text object. Just a pretty call to head and tail

Usage

headTail(x,hlength=4,tlength=4,digits=2,ellipsis=TRUE) headtail(x,hlength=4,tlength=4,digits=2,ellipsis=TRUE) topBottom(x,hlength=4,tlength=4,digits=2)

Arguments

x
A matrix or data frame or free text
hlength
The number of lines at the beginning to show
tlength
The number of lines at the end to show
digits
Round off the data to digits
ellipsis
Separate the head and tail with dots (ellipsis)

Value

topBottom is just a call to headTail with ellipsis = FALSE and returning a matrix output.

See Also

head and tail

Examples

Run this code

headTail(iqitems[1:5],4,8)

Run the code above in your browser using DataCamp Workspace