Description
peek
- Convenience function to view all the columns of the head
of a truncated 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
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 alligned.
Value
Prints a truncated head but invisibly returns x
.
Details
By default dplyr does not print all columns of a data frame
(tbl_df
). 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.
Examples
Run this code# NOT RUN {
peek(mtcars)
peek(presidential_debates_2012)
# }
Run the code above in your browser using DataLab