Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inline_text.gtsummary

Report statistics from summary tables inline


Description

Report statistics from summary tables inline

Usage

## S3 method for class 'gtsummary'
inline_text(x, variable, level = NULL, column = NULL, pattern = NULL, ...)

Arguments

x

gtsummary object

variable

Variable name of statistic to present

level

Level of the variable to display for categorical variables. Default is NULL

column

Column name to return from x$table_body.

pattern

String indicating the statistics to return. Uses glue::glue formatting. Default is NULL

...

Not used

column + pattern

Some gtsummary tables report multiple statistics in a single cell, e.g. "{mean} ({sd})" in tbl_summary() or tbl_svysummary(). We often need to report just the mean or the SD, and that can be accomplished by using both the column= and pattern= arguments. When both of these arguments are specified, the column argument selects the column to report statistics from, and the pattern argument specifies which statistics to report, e.g. inline_text(x, column = "stat_1", pattern = "{mean}") reports just the mean from a tbl_summary().


gtsummary

Presentation-Ready Data Summary and Analytic Result Tables

v1.4.0
MIT + file LICENSE
Authors
Daniel D. Sjoberg [aut, cre] (<https://orcid.org/0000-0003-0862-2018>), Michael Curry [aut] (<https://orcid.org/0000-0002-0261-4044>), Margie Hannum [aut] (<https://orcid.org/0000-0002-2953-0449>), Joseph Larmarange [aut] (<https://orcid.org/0000-0001-7097-700X>), Karissa Whiting [aut] (<https://orcid.org/0000-0002-4683-1868>), Emily C. Zabor [aut] (<https://orcid.org/0000-0002-1402-4498>), Esther Drill [ctb] (<https://orcid.org/0000-0002-3315-4538>), Jessica Flynn [ctb] (<https://orcid.org/0000-0001-8310-6684>), Jessica Lavery [ctb] (<https://orcid.org/0000-0002-2746-5647>), Stephanie Lobaugh [ctb], Gustavo Zapata Wainberg [ctb] (<https://orcid.org/0000-0002-2524-3637>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.