ic_autopeek: Get descriptive one-line summary of an object

View source: R/autopeek.R

ic_autopeekR Documentation

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 class 'list'
ic_autopeek(object, max_summary_length = cli::console_width(), ...)

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

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.

Details

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

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.

Methods (by class)

  • ic_autopeek(list): Method for list

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

See Also

utils::str() ic_peek()


icecream documentation built on Sept. 27, 2023, 5:08 p.m.