print_data.frame: Print (abbreviated) 'data.frame'

View source: R/print_data.frame.R

print_data.frameR Documentation

Description

This function prints a (possibly abbreviated) data.frame.

Usage

print_data.frame(
  x,
  rows = NULL,
  cols = NULL,
  digits = NULL,
  row.names = TRUE,
  col.names = TRUE
)

Arguments

x

[data.frame]
A data.frame.

rows, cols

[integer(1) | NULL ]
The number of rows or columns to be printed, greater or equal 2.

Printing is abbreviated in the middle.

Can be NULL to print everything.

digits

[integer(1) | NULL ]
The number of decimal places to be used.

Negative values are allowed, resulting in rounding to a power of ten.

Can be NULL to not round.

row.names, col.names

[logical(1)]
Print row names or column names?

Value

Invisibly returns x.

See Also

Other package helpers: Dictionary, Storage, identical_structure(), input_check_response(), match_arg(), package_logo(), print_matrix(), renv_development_packages(), system_information(), unexpected_error(), user_confirm()

Examples

x <- data.frame(1:10, LETTERS[1:10], stats::rnorm(10))
print_data.frame(x, rows = 7)
print_data.frame(x, rows = 7, cols = 2)
print_data.frame(x, rows = 7, cols = 2, digits = 1)
print_data.frame(x, rows = 7, cols = 2, digits = 1, row.names = FALSE)
print_data.frame(x, rows = 7, cols = 2, digits = 1, col.names = FALSE)

oeli documentation built on Oct. 16, 2024, 5:08 p.m.