textreadr (version 1.2.0)

peek: Data Frame Viewing

Description

peek - Convenience function to view all the columns of the head of a truncated base::data.frame(). peek invisibly returns x. This makes its use ideal in a dplyr/magrittr pipeline.

unpeek - Strips out class textreadr so that the entire base::data.frame() will be printed.

Usage

peek(x, n = 10, width = 20, strings.left = TRUE, ...)

unpeek(x)

Arguments

n

Number of rows to display.

width

The width of the columns to be displayed.

strings.left

logical. If TRUE strings will be left aligned.

...

For internal use.

Value

Prints a truncated head but invisibly returns x.

Details

By default dplyr does not print all columns of a tibble. This makes inspection of data difficult at times, particularly with text string data. peek() allows the user to see a truncated head for inspection purposes.

See Also

utils::head()

Examples

Run this code
# NOT RUN {
peek(mtcars)
peek(presidential_debates_2012)
# }

Run the code above in your browser using DataLab