Learn R Programming

icecream (version 0.2.2)

ic_autopeek: Get descriptive one-line summary of an object

Description

This function is created as a modification of utils::str() function. It is supposed to create more compacted yet informative summary about an object. It's default value of "icecream.peeking.function"

Usage

ic_autopeek(object, ...)

# S3 method for list ic_autopeek(object, max_summary_length = cli::console_width(), ...)

# S3 method for data.frame ic_autopeek(object, max_summary_length = cli::console_width(), ...)

Value

The function is mainly used for its side effects -- outputting to the terminal. However, it also returns an invisible string of the printed summary.

Arguments

object

The object to be summarized.

...

Other arguments passed to methods.

max_summary_length

Integer. Maximum length of string summarizing the object. By default this is set to the current terminal width.

Methods (by class)

  • ic_autopeek(list): Method for list

  • ic_autopeek(data.frame): Method for data.frame

Details

This is a generic function. Default method simply calls utils::str function.

See Also

utils::str() ic_peek()