print_method {descstat}R Documentation

Print methods for bin, freq_table and cont_table objects

Description

freq_table and cont_table are tibbles with specific format and print methods for pretty printing. A pre_print generic is provided with specific methods to put in form freq_table and cont_table objects.

Usage

pre_print(x, ...)

## S3 method for class 'freq_table'
pre_print(x, ...)

## S3 method for class 'cont_table'
pre_print(x, ..., row_name = TRUE, total_name = "Total")

## S3 method for class 'freq_table'
format(x, ..., n = NULL, width = NULL, n_extra = NULL)

## S3 method for class 'cont_table'
format(
  x,
  ...,
  n = NULL,
  width = NULL,
  n_extra = NULL,
  row_name = TRUE,
  total_name = "Total"
)

## S3 method for class 'cont_table'
print(
  x,
  ...,
  n = NULL,
  width = NULL,
  n_extra = NULL,
  row_name = TRUE,
  total_name = "Total"
)

## S3 method for class 'bin'
print(x, ...)

Arguments

x

a bin, a freq_table or a cont_table object,

...

further arguments,

row_name

a logical that indicates whether the first column in the two-ways contingency table, that contains the levels of the first series, should be named,

total_name

the name of the line (and of the column for cont_table) that contains the total (default is "Total"),

n, width, n_extra

see tibble::formatting and tibble::formatting.

Value

a tibble, for the cont_table it is a tibble in wide format as the cont_table object is in long format.


[Package descstat version 0.1-2 Index]