Skip to content

Commit b3d8c61

Browse files
authored
Merge pull request #39 from R4EPI/cran_manual_review
Cran manual review
2 parents 43a4625 + d4e4715 commit b3d8c61

File tree

6 files changed

+68
-36
lines changed

6 files changed

+68
-36
lines changed

CRAN-SUBMISSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Version: 0.1.0
2-
Date: 2025-11-05 17:14:19 UTC
3-
SHA: bd9b2707d6ba19bcf84d99ae7450e73339c028c5
2+
Date: 2025-11-09 18:56:31 UTC
3+
SHA: 68c8bacd319e6762dea8c219dc19e210bf6787ff

DESCRIPTION

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,48 @@ Package: epitabulate
22
Title: Tables for Epidemiological Analysis
33
Version: 0.1.0
44
Authors@R: c(
5-
person(given = "Alexander",
6-
family = "Spina",
7-
email = "[email protected]",
8-
comment = c(ORCID = "0000-0001-8425-1867"),
9-
role = c("aut", "cre")),
10-
person(given = "Zhian N.",
11-
family = "Kamvar",
12-
role = c("aut"),
13-
email = "[email protected]",
5+
person("Alexander", "Spina", , "[email protected]", role = c("aut", "cre"),
6+
comment = c(ORCID = "0000-0001-8425-1867")),
7+
person("Zhian N.", "Kamvar", , "[email protected]", role = "aut",
148
comment = c(ORCID = "0000-0003-1458-7108")),
15-
person(given = "Amy",
16-
family = "Gimma",
17-
role = "aut"),
18-
person(given = "Kate",
19-
family = "Doyle",
20-
role = "ctb"),
21-
person("Applied Epi Incorporated",
22-
role = "cph"),
23-
person("Medecins Sans Frontieres Operational Centre Amsterdam",
24-
role = "fnd"))
25-
Description: Produces tables for descriptive epidemiological analysis. These
26-
tables include attack rates, case fatality ratios and mortality rates
27-
(with appropriate confidence intervals), with additional functionality to
28-
calculate Mantel-Haenszel odds, risk, and incidence rate ratios.
9+
person("Amy", "Gimma", role = "aut"),
10+
person("Kate", "Doyle", role = "ctb"),
11+
person("Applied Epi Incorporated", role = "cph"),
12+
person("Medecins Sans Frontieres Operational Centre Amsterdam", role = "fnd")
13+
)
14+
Description: Produces tables for descriptive epidemiological analysis.
15+
These tables include attack rates, case fatality ratios, and mortality
16+
rates (with appropriate confidence intervals), with additional
17+
functionality to calculate Mantel-Haenszel odds, risk, and incidence
18+
rate ratios. The methods implemented follow standard epidemiological
19+
approaches described in Rothman et al. (2008, ISBN:978-0-19-513554-2).
2920
This package is part of the 'R4EPIs' project <https://R4EPI.github.io/sitrep/>.
3021
License: GPL-3
31-
Encoding: UTF-8
32-
LazyData: true
33-
Roxygen: list(markdown = TRUE)
34-
RoxygenNote: 7.3.2
35-
URL: https://R4EPI.github.io/epitabulate/, https://github.com/R4EPI/epitabulate/
22+
URL: https://R4EPI.github.io/epitabulate/,
23+
https://github.com/R4EPI/epitabulate/
3624
BugReports: https://github.com/R4EPI/epitabulate/issues
3725
Imports:
3826
binom,
3927
dplyr (>= 1.0.2),
4028
epikit (>= 0.1.2),
4129
forcats,
4230
glue,
43-
gtsummary,
31+
gtsummary,
4432
MASS,
4533
purrr,
4634
rlang (>= 0.4.0),
47-
scales,
35+
scales,
4836
stats,
4937
tibble (>= 3.0.0),
5038
tidyr (>= 1.0.0),
5139
tidyselect (>= 1.0.0)
5240
Suggests:
53-
broom.helpers,
54-
cardx,
55-
testthat,
41+
broom.helpers,
42+
cardx,
43+
covr,
5644
matchmaker (>= 0.1.0),
57-
covr
45+
testthat
46+
Encoding: UTF-8
47+
LazyData: true
48+
Roxygen: list(markdown = TRUE)
49+
RoxygenNote: 7.3.2

R/gt_univariate_crosstabs.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ utils::globalVariables(c("n_obs", "n_event", "n_nonevent", "estimate",
1515
#'This is only works for dichotomous variables (yes/no, TRUE/FALSE,
1616
#'male/female), others will be dropped with a warning message. (Default is FALSE)
1717
#'
18+
#'@return A modified `gtsummary` table object (same class as input — e.g.
19+
#' `"tbl_uvregression"` or `"tbl_cmh"`) containing additional cross-tabulated
20+
#' counts of outcomes and exposures. The structure depends on regression type:
21+
#' \itemize{
22+
#' \item For logistic models: adds case and control counts.
23+
#' \item For Poisson models without offsets: adds total and case counts per exposure group (risk ratios).
24+
#' \item For Poisson models with offsets: adds total person-time and case counts per exposure group (incidence rate ratios).
25+
#' \item When `wide = TRUE`, dichotomous variables are reshaped to wide format with separate columns for exposed/unexposed counts.
26+
#' }
27+
#'
1828
#'@importFrom gtsummary modify_table_styling modify_table_body modify_header modify_fmt_fun style_number modify_footnote
1929
#'@importFrom dplyr mutate relocate
2030
#'@importFrom rlang enquo as_label quo_get_expr

R/gt_univariate_stratified.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ utils::globalVariables(c("n_obs", "n_event", "n_nonevent", "estimate",
3030
#'
3131
#' @param conf.level Confidence level for confidence intervals (default 0.95)
3232
#'
33+
#' @return A gtsummary table of class `"tbl_cmh"` (and `"gtsummary"`, `"tbl_stack"`)
34+
#' containing:
35+
#' \itemize{
36+
#' \item Crude estimates of association (odds ratios, risk ratios, or rate ratios)
37+
#' \item Stratified estimates for each level of the stratification variable
38+
#' \item Cochran–Mantel–Haenszel (CMH) adjusted estimates with 95\% confidence intervals
39+
#' \item Woolf test p-values for assessing homogeneity across strata (when applicable)
40+
#' }
41+
#'
3342
#' @importFrom tidyselect vars_select
3443
#' @importFrom dplyr mutate relocate filter
3544
#' @importFrom rlang enquo as_label

man/add_crosstabs.Rd

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/tbl_cmh.Rd

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)