print_methods: Print methods for bin, freq_table and cont_table objects

Description Usage Arguments Value

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.


descstat documentation built on Feb. 17, 2021, 5:07 p.m.