From e51ca736f6a37eeb41f1219112907ad74456ede4 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 29 Dec 2025 14:28:40 +0800 Subject: [PATCH 1/7] Update package dependencies in DESCRIPTION file Signed-off-by: Joe Zhu --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ab9e876..3c706a2 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,20 +25,20 @@ URL: https://insightsengineering.github.io/tern.gee/, BugReports: https://github.com/insightsengineering/tern.gee/issues Depends: R (>= 4.0), - tern (>= 0.9.9) + tern (>= 0.9.10) Imports: checkmate (>= 2.1.0), emmeans (>= 1.10.4), - formatters (>= 0.5.11), + formatters (>= 0.5.12), geeasy, geepack, nlme, - rtables (>= 0.6.13), + rtables (>= 0.6.15), stats Suggests: dplyr (>= 1.0.9), knitr (>= 1.42), - rmarkdown (>= 2.23), + rmarkdown (>= 2.28), testthat (>= 3.1), vdiffr (>= 1.0.7), withr (>= 2.0.0) From 696d194195033e8271931224b6645ae4e5feb167 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 29 Dec 2025 14:46:25 +0800 Subject: [PATCH 2/7] Add Rcpp as a suggested dependency Signed-off-by: Joe Zhu --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 3c706a2..bee9671 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,6 +38,7 @@ Imports: Suggests: dplyr (>= 1.0.9), knitr (>= 1.42), + Rcpp (>= 1.1.0), rmarkdown (>= 2.28), testthat (>= 3.1), vdiffr (>= 1.0.7), From cd2140f36389c119a6c6c86f1c511b30bc5f84a9 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Mon, 29 Dec 2025 15:00:57 +0800 Subject: [PATCH 3/7] Update R version dependency in DESCRIPTION Updated R version dependency from >= 4.0 to >= 4.4.0. Signed-off-by: Joe Zhu --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index bee9671..0110d63 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,7 +24,7 @@ URL: https://insightsengineering.github.io/tern.gee/, https://github.com/insightsengineering/tern.gee/ BugReports: https://github.com/insightsengineering/tern.gee/issues Depends: - R (>= 4.0), + R (>= 4.4.0), tern (>= 0.9.10) Imports: checkmate (>= 2.1.0), From 9dea146efb4ac19b96aca4eb11e339a3fc9db5e5 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Thu, 1 Oct 2026 23:10:51 +0800 Subject: [PATCH 4/7] fix validation report --- _pkgdown.yml | 2 + pkgdown/extra.js | 127 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 pkgdown/extra.js diff --git a/_pkgdown.yml b/_pkgdown.yml index 749d000..085264a 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -18,6 +18,8 @@ navbar: href: unit-test-report/ - text: Non-CRAN unit test report href: unit-test-report-non-cran/ + - text: Validation report + href: https://pharmar.github.io/pharmapkgs/src/contrib/Meta/validation_report_tern.gee_v0.1.5.html github: icon: fa-github href: https://github.com/insightsengineering/tern.gee diff --git a/pkgdown/extra.js b/pkgdown/extra.js new file mode 100644 index 0000000..8a763af --- /dev/null +++ b/pkgdown/extra.js @@ -0,0 +1,127 @@ +// Resolve the "Validation report" navbar link to the correct report for the +// documentation version currently being viewed. +// +// pkgdown builds one independent static site per package version, and this file +// is auto-included on every page of each build. It reads the version shown in +// the navbar and points the link at the newest validation report whose version +// is <= the current version. Versions older than the first available report do +// not get a link at all. +// +// To add a report for a future release, add its version to REPORTS. Order does +// not matter. Also update the static href in _pkgdown.yml, which is what readers +// with JavaScript disabled get. +(function () { + "use strict"; + + // Versions that have a validation report. Order does not matter. + var REPORTS = ["0.1.15"]; + var REPORT_BASE = + "https://pharmar.github.io/pharmapkgs/src/contrib/Meta/validation_report_tern.gee_v"; + + // Parse a version string like "0.2.13" or "0.2.13.9004" into a numeric array. + function parseVersion(v) { + return v.split(/[.-]/).map(function (x) { + var n = parseInt(x, 10); + return isNaN(n) ? 0 : n; + }); + } + + // Compare two parsed versions: returns <0, 0, or >0. + function compareVersions(a, b) { + var len = Math.max(a.length, b.length); + for (var i = 0; i < len; i++) { + var d = (a[i] || 0) - (b[i] || 0); + if (d !== 0) return d; + } + return 0; + } + + // Newest report version that is <= the current version, or null if none. + // Takes the maximum rather than the last match, so REPORTS need not be sorted. + function pickReport(current) { + var cur = parseVersion(current); + var chosen = null; + for (var i = 0; i < REPORTS.length; i++) { + if (compareVersions(cur, parseVersion(REPORTS[i])) < 0) continue; + if (chosen === null || compareVersions(parseVersion(REPORTS[i]), parseVersion(chosen)) > 0) { + chosen = REPORTS[i]; + } + } + return chosen; + } + + // Read the package version from the navbar of the current page. + function detectVersion() { + var selectors = [ + ".navbar small", + "small.nav-text", + ".navbar .version", + ".navbar-brand + small", + "header .version" + ]; + var re = /\d+\.\d+\.\d+(?:\.\d+)*/; + for (var i = 0; i < selectors.length; i++) { + var el = document.querySelector(selectors[i]); + if (el) { + var m = el.textContent.match(re); + if (m) return m[0]; + } + } + // Fallback: scan the whole navbar/header text. + var header = document.querySelector(".navbar") || document.querySelector("header"); + if (header) { + var hm = header.textContent.match(re); + if (hm) return hm[0]; + } + return null; + } + + // Find the "Validation report" anchor by its (case-insensitive) link text. + // Scoped to the navbar so page content using the same wording is left alone. + function findLink() { + var roots = [document.querySelector(".navbar"), document.querySelector("header")]; + for (var r = 0; r < roots.length; r++) { + if (!roots[r]) continue; + var anchors = roots[r].querySelectorAll("a"); + for (var i = 0; i < anchors.length; i++) { + if (anchors[i].textContent.trim().toLowerCase() === "validation report") { + return anchors[i]; + } + } + } + return null; + } + + // Nearest ancestor
  • , or null. Stands in for Element.closest(), which the + // rest of this file's ES5 target does not assume. + function closestListItem(el) { + for (var node = el; node; node = node.parentNode) { + if (node.nodeName && node.nodeName.toLowerCase() === "li") return node; + } + return null; + } + + function run() { + var link = findLink(); + if (!link) return; + + var version = detectVersion(); + // If we cannot detect the version, leave the static fallback href in place. + if (!version) return; + + var report = pickReport(version); + if (report) { + link.setAttribute("href", REPORT_BASE + report + ".html"); + } else { + // No report for versions older than the first available one: drop the item. + var target = closestListItem(link) || link; + if (target.parentNode) target.parentNode.removeChild(target); + } + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", run); + } else { + run(); + } +})(); From 636287560da62e9fda59b34b22a73e787f72efab Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Fri, 2 Oct 2026 00:11:25 +0800 Subject: [PATCH 5/7] updatE --- DESCRIPTION | 6 +++--- NEWS.md | 4 +++- pkgdown/extra.js | 2 +- vignettes/tern-gee.Rmd | 10 +++++----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ab9e876..4780321 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Type: Package Package: tern.gee Title: Tables and Graphs for Generalized Estimating Equations (GEE) Model Fits -Version: 0.1.5.9009 -Date: 2025-11-28 +Version: 0.1.6 +Date: 2026-10-01 Authors@R: c( person("Daniel", "Sabanés Bové", , "daniel@rconis.com", role = "aut"), person("Joe", "Zhu", , "joe.zhu@roche.com", role = c("aut", "cre"), @@ -33,7 +33,7 @@ Imports: geeasy, geepack, nlme, - rtables (>= 0.6.13), + rtables (>= 0.6.17), stats Suggests: dplyr (>= 1.0.9), diff --git a/NEWS.md b/NEWS.md index 0174d63..cf63ee1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,6 @@ -# tern.gee 0.1.5.9009 +# tern.gee 0.1.6 + +# Up version `rtables` package version to 0.6.17. # tern.gee 0.1.5 diff --git a/pkgdown/extra.js b/pkgdown/extra.js index 8a763af..984c7ef 100644 --- a/pkgdown/extra.js +++ b/pkgdown/extra.js @@ -14,7 +14,7 @@ "use strict"; // Versions that have a validation report. Order does not matter. - var REPORTS = ["0.1.15"]; + var REPORTS = ["0.1.5"]; var REPORT_BASE = "https://pharmar.github.io/pharmapkgs/src/contrib/Meta/validation_report_tern.gee_v"; diff --git a/vignettes/tern-gee.Rmd b/vignettes/tern-gee.Rmd index 7f3dc4d..a15206e 100644 --- a/vignettes/tern-gee.Rmd +++ b/vignettes/tern-gee.Rmd @@ -120,13 +120,13 @@ functionality to summarize the results of a `lsmeans()` object in an package](https://insightsengineering.github.io/rtables/). ```{r} -fev_counts <- fev_data %>% - dplyr::select(USUBJID, ARMCD) %>% +fev_counts <- fev_data |> + dplyr::select(USUBJID, ARMCD) |> unique() -fev_gee_table <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARMCD", ref_group = "PBO") %>% - summarize_gee_logistic() %>% +fev_gee_table <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARMCD", ref_group = "PBO") |> + summarize_gee_logistic() |> build_table(fev_lsmeans, alt_counts_df = fev_counts) fev_gee_table From 54b3d8da3c62ecd58f84607d6a7ed2e3e34b811c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 16:19:20 +0000 Subject: [PATCH 6/7] [skip roxygen] [skip vbump] Roxygen Man Pages Auto Update --- DESCRIPTION | 2 +- man/reexports.Rd | 2 +- man/tern.gee-package.Rd | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 13cb0bc..957d33d 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,4 +56,4 @@ Encoding: UTF-8 Language: en-US LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.3 +Config/roxygen2/version: 8.1.0 diff --git a/man/reexports.Rd b/man/reexports.Rd index e4880f2..3b498b3 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -11,6 +11,6 @@ These objects are imported from other packages. Follow the links below to see their documentation. \describe{ - \item{tern}{\code{\link[tern]{as.rtable}}} + \item{tern}{\code{\link[tern:as.rtable]{as.rtable()}}} }} diff --git a/man/tern.gee-package.Rd b/man/tern.gee-package.Rd index 703222e..b5ae750 100644 --- a/man/tern.gee-package.Rd +++ b/man/tern.gee-package.Rd @@ -22,6 +22,7 @@ Useful links: Authors: \itemize{ + \item Joe Zhu \email{joe.zhu@roche.com} (\href{https://orcid.org/0000-0001-7566-2787}{ORCID}) \item Daniel Sabanés Bové \email{daniel@rconis.com} \item Emily de la Rua \email{emily.de_la_rua@contractors.roche.com} } From 82cc0deda7759d5a1e14d3897f6c9d5eaff811d4 Mon Sep 17 00:00:00 2001 From: Joe Zhu Date: Tue, 13 Oct 2026 03:06:07 +0800 Subject: [PATCH 7/7] repair url --- README.md | 2 +- vignettes/tern-gee.Rmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96b85c9..534555a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ ## Overview -`tern.gee` provides an interface for generalized estimating equations (GEE) within the [`tern`](https://insightsengineering.github.io/tern/) framework to produce commonly used tables (using [`rtables`](https://insightsengineering.github.io/rtables/) and graphs. +`tern.gee` provides an interface for generalized estimating equations (GEE) within the [`tern`](https://insightsengineering.github.io/tern/) framework to produce commonly used tables (using [`rtables`](https://pharmaverse.github.io/rtables/) and graphs. It builds on the R-package `geepack` for the actual GEE calculations. ## When to use this package diff --git a/vignettes/tern-gee.Rmd b/vignettes/tern-gee.Rmd index a15206e..d4f94fe 100644 --- a/vignettes/tern-gee.Rmd +++ b/vignettes/tern-gee.Rmd @@ -117,7 +117,7 @@ After fitting a GEE model and extracting the LS means you may want to display your results in a table. The `tern.gee` package contains functionality to summarize the results of a `lsmeans()` object in an `rtable` structure, using additional functions from the [`rtables` -package](https://insightsengineering.github.io/rtables/). +package](https://pharmaverse.github.io/rtables/). ```{r} fev_counts <- fev_data |>