headtail: Print First and Last Rows of a Data Frame

View source: R/io.R

headtailR Documentation

Print First and Last Rows of a Data Frame

Description

Print the first and last rows of a data frame using head and tail, respectively. Print the number of omitted rows

Usage

headtail(x, n = 6, pattern = "[%d rows omitted]")

Arguments

x

data frame

n

total number of rows to be printed.

pattern

pattern given to sprintf containing a %d placeholder to print the number of omitted rows

Value

number of omitted rows, invisibly

Examples

x <- data.frame(number = 1:26, letter = LETTERS)
headtail(x)
headtail(x, 10)
headtail(x, 16)
headtail(x[10:20, ], 10)


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.