Learn R Programming

spicy (version 0.3.0)

print.spicy: Print a Formatted Data Frame with Aligned Columns

Description

print.spicy() prints a data frame with properly aligned columns, following a structured three-line table format. The first column is left-aligned, while all other columns are right-aligned. Column widths are dynamically adjusted based on the longest value in each column, including column names.

Usage

# S3 method for spicy
print(x, ...)

Value

Invisibly returns x after displaying its formatted content.

Arguments

x

A data frame, matrix, array (2D), or table.

...

Additional arguments (not used).

Examples

Run this code
x <- mtcars
class(x) <- c("spicy", class(x))
print(x)

Run the code above in your browser using DataLab