head_and_tail: Display head and tail of a long data frame

Description Usage Arguments Examples

View source: R/head_and_tail.R

Description

Works just like head() or tail but shows both the first and last rows

Usage

1
head_and_tail(df, n = 4L, ntop = n, nbottom = n, nmiddle = 0L)

Arguments

df

A data frame or data-frame-like object

n

A number specifying the number of rows to show at the top and bottom.

ntop

Overrides n to specify the number of rows to show at the top

nbottom

Overrides n to specify the number of rows at the bottom

nmiddle

Integer. Whether to show intermediate row to indicate that there are elided rows

Examples

1
2
3
head_and_tail(mtcars)
mtcars %>% head_and_tail(ntop=2, nbottom=4)
mtcars %>% head_and_tail(nmiddle = 3)

dtkaplan/mosaicUSAFA documentation built on Aug. 21, 2021, 10:37 p.m.