format_tbl: Formats the descriptives table outputted by 'descriptives'.

Description Usage Arguments Value

View source: R/format.R

Description

Allows for easy formatting of summary statistics table. Treatment group counts are added to the column names, duplicated categorical variable names and p-values are removed, and p-values are rounded.

Usage

1
2
3
4
5
6
7
format_tbl(
  obj,
  add_Ns = TRUE,
  remove_duplicates = TRUE,
  remove_false = TRUE,
  p_val_digits = 3L
)

Arguments

obj

<tbl_df> Tibble outputted by descriptives.

add_Ns

<logical(1)> Should treatment counts be added to column names?

remove_duplicates

<logical(1)> Should repeated variable names and p-values for categorical variables be removed? If TRUE, variable names and p-values will be presented only once on their own row.

remove_false

<logical(1)> Should binary variables only show the N and percent of TRUE?

p_val_digits

<integer(1)> Number of digits to round p-values.

Value

<tbl_df> Formatted tibble


MethodsConsultants/tibbletest documentation built on June 28, 2021, 5:22 p.m.