assign_summary_digits: Assign Default Digits

View source: R/assign_summary_digits.R

assign_summary_digitsR Documentation

Assign Default Digits

Description

Used to assign the default formatting for variables summarized with tbl_summary().

Usage

assign_summary_digits(data, statistic, type, digits = NULL)

Arguments

data

(data.frame)
a data frame

statistic

(⁠named list⁠)
a named list; notably, not a formula-list-selector

type

(⁠named list⁠)
a named list; notably, not a formula-list-selector

digits

(⁠named list⁠)
a named list; notably, not a formula-list-selector. Default is NULL

Value

a named list

Examples

assign_summary_digits(
  mtcars,
  statistic = list(mpg = "{mean}"),
  type = list(mpg = "continuous")
)

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.