headtail {psych}R Documentation

Combine calls to head and tail

Description

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

Usage

headtail(x,hlength=6,tlength=6,digits=2)

Arguments

x A matrix or data frame or something that can be coerced into a dataframe
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

Value

The first hlength and last tlength lines of a matrix or data frame with an ellipsis in between.

See Also

head and tail

Examples

x <- matrix(sample(10,1000,TRUE),ncol=5)
headtail(x,4,8)


[Package psych version 1.0-42 Index]