add_n_regression {gtsummary} | R Documentation |
Add N to regression table
Description
Add N to regression table
Usage
## S3 method for class 'tbl_regression'
add_n(x, location = "label", ...)
## S3 method for class 'tbl_uvregression'
add_n(x, location = "label", ...)
Arguments
x |
( |
location |
( When |
... |
These dots are for future extensions and must be empty. |
Examples
# Example 1 ----------------------------------
trial |>
select(response, age, grade) |>
tbl_uvregression(
y = response,
exponentiate = TRUE,
method = glm,
method.args = list(family = binomial),
hide_n = TRUE
) |>
add_n(location = "label")
# Example 2 ----------------------------------
glm(response ~ age + grade, trial, family = binomial) |>
tbl_regression(exponentiate = TRUE) |>
add_n(location = "level")
[Package gtsummary version 2.0.0 Index]