show_df: Show data.frame

View source: R/utils_print.R

show_dfR Documentation

Show data.frame

Description

Create a pretty text representation of a data.frame.

Usage

show_df(
  x,
  pad = 0L,
  spacing = 1L,
  ddSci_dp = NULL,
  transpose = FALSE,
  justify = "right",
  incl_colnames = TRUE,
  incl_rownames = TRUE,
  colnames_formatter = highlight,
  rownames_formatter = gray,
  output_type = NULL
)

Arguments

x

data frame

pad

Integer: Pad output with this many spaces.

spacing

Integer: Number of spaces between columns.

ddSci_dp

Integer: Number of decimal places to print using ddSci. Default = NULL for no formatting

transpose

Logical: If TRUE, transpose x before printing.

justify

Character: "right", "left".

incl_colnames

Logical: If TRUE, include column names.

incl_rownames

Logical: If TRUE, include row names.

colnames_formatter

Format function for printing column names.

rownames_formatter

Format function for printing row names.

output_type

Character ("ansi", "html", "plain") or NULL: Output type. If NULL, resolved via get_output_type().

Value

Character: Formatted string representation of the data.frame.

Author(s)

EDG

Examples

show_df(iris[1:3, ]) |> cat()

rtemis.core documentation built on Sept. 20, 2026, 9:06 a.m.