Learn R Programming

popbio (version 2.8)

head2: Return the first and last part of a matrix or dataframe

Description

Returns the first and last rows using output from both head and tail and separates the two parts with dots. Useful for viewing ordered datasets such as longitudinal census data.

Usage

head2(x, head = 3, tail = 1, dotrows = 1)

Value

A smaller object with first and last rows only

Arguments

x

A matrix or dataframe

head

The number of first rows

tail

The number of last rows

dotrows

The number of rows of dots

Author

Chris Stubben

Examples

Run this code
head2(aq.trans)

Run the code above in your browser using DataLab