Learn R Programming

logos (version 0.1.0)

peek: Take a Quick Overview of Your Data

Description

peek() provides a transposed view of your dataset: columns are displayed vertically, while the data for each column is shown horizontally. This layout allows you to inspect all the columns of a data.frame at a glance. It serves as a convenient wrapper around utils::str(), with the added benefit of invisibly returning the input object, making it suitable for use in data pipelines.

Usage

peek(x, width = getOption("width"), ...)

Value

The input object x, returned invisibly.

Arguments

x

The object to be inspected.

width

integer(1). Specifies the maximum width of the output.

...

Additional arguments to pass to utils::str().

Examples

Run this code
peek(mtcars)

Run the code above in your browser using DataLab