dim.gtsummary: gtsummary table dimension

View source: R/dim.R

dim.gtsummaryR Documentation

gtsummary table dimension

Description

Returns the dimension of a gtsummary table, that is, the number of rows and the number of un-hidden columns.

nrow() calls dim(); therefore, nrow() will also work on gtsummary tables.

Usage

## S3 method for class 'gtsummary'
dim(x)

Arguments

x

(gtsummary)
a 'gtsummary' table

Value

integer vector

Examples

tbl <- tbl_summary(trial, include = age, by = trt)

dim(tbl)
nrow(tbl)

gtsummary documentation built on Aug. 26, 2026, 9:07 a.m.