describe: Describe an object

describeR Documentation

Describe an object

Description

describe provides a flexible summary of various R objects, such as data frames or Blimp model objects. It is an alternative to summary and is inspired by precis from the rethinking package.

Usage

describe(
  object,
  depth = 1,
  pars,
  prob = 0.95,
  digits = 2,
  sort = NULL,
  decreasing = FALSE,
  ...
)

## S4 method for signature 'data.frame'
describe(
  object,
  depth = 1,
  pars,
  prob = 0.5,
  digits = 2,
  sort = NULL,
  decreasing = FALSE,
  hist = TRUE,
  ...
)

## S4 method for signature 'blimp_obj'
describe(
  object,
  depth = 1,
  pars,
  prob = 0.95,
  digits = 2,
  sort = NULL,
  decreasing = FALSE,
  hist = TRUE,
  ...
)

Arguments

object

The object to describe.

depth

An integer (1, 2, or 3) that controls the display of vector and matrix parameters. depth=1 (default) shows only scalar parameters. depth=2 shows scalars and vectors. depth=3 shows all parameters.

pars

An optional character vector of parameter names to include in the summary.

prob

The probability mass for the credible interval (e.g., quantile interval).

digits

The number of decimal places to display in the output.

sort

An optional character string specifying a column name to sort the results by.

decreasing

Logical. If TRUE, sorting is in decreasing order.

...

Additional arguments passed to specific methods.

hist

Logical. If TRUE (and on a Unix-like OS), a unicode histogram (histospark) is included in the output. Defaults to TRUE.

Value

An object of class describe, which is a data frame containing summary statistics and attributes for printing.

Author(s)

The data.frame method is adapted from Richard McElreath's precis function in the rethinking package (https://github.com/rmcelreath/rethinking). The histospark function is by Hadley Wickham (GPL-3). The blimp_obj method was written for this package.


rblimp documentation built on May 18, 2026, 9:07 a.m.