Adds a column of the number of events to tables created with tbl_uvregression. Supported model types include GLMs with binomial distribution family (e.g. stats::glm, lme4::glmer, and geepack::geeglm) and Cox Proportion Hazards regression models (survival::coxph).

# S3 method for tbl_uvregression
add_nevent(x, ...)



tbl_uvregerssion object


Not used


A tbl_uvregression object

Reporting Event N

The number of events is added to the internal .$table_body tibble, and printed to the right of the N column. The number of events is also accessible via the inline_text function for printing in a report.

Example Output

See also


Daniel D. Sjoberg


tbl_uv_nevent_ex <- trial[c("response", "trt", "age", "grade")] %>% tbl_uvregression( method = glm, y = response, method.args = list(family = binomial) ) %>% add_nevent()