← Back to all sparks
T

tern

ANALYTICS
Velocity0.0

Table, Listings, and Graphs (TLG) library for common outputs used in clinical trials

tern is migrating its entire analysis-function catalogue off make_afun(), one release at a time.

clinical-trialstablesr-packagepharmaverserefactor
Current state
tern builds the clinical-trial tables, listings, and graphs layer on top of rtables — occurrence counts, survival summaries, ANCOVA, incidence rates, subgroup and biomarker tabulations. The visible work across the window is a systematic refactor: dozens of analysis functions rewritten to drop make_afun() and adopt a common analysis-function style driven by rtables' additional_fun_params. Feature additions ride along with it.
Where it's heading
This is a multi-release architectural migration, not incremental polish. Each release converts another batch of functions, and the count is large — roughly two dozen in the most recent entry alone, after a comparable batch the release before. Alongside it, the denom parameter is being threaded through counting functions and g_lineplot is accumulating layout control, both patterns of standardising arguments that previously varied per function.
Prediction
The refactor should continue until the make_afun() dependency is gone entirely, with the remaining tabulate_* and biomarker functions the likely next batch; the entries give no date for completion.

Recent moves

  1. 1y ago

    Two dozen more analysis functions drop make_afun()

    ⚡ SPARK

    The largest single batch of the migration described above, covering abnormality counts, proportion estimation, survival timepoints, and the subgroup and biomarker tabulators. At this scale the refactor stops being internal cleanup and becomes the package's defining direction.

    View source ↗
  2. 1y ago

    denom threading, custom statistics, and compare_vars merged in

    The release that laid the groundwork: analyze_vars() and a_summary() were rewritten to take all rtables parameter options, custom statistical functions became pluggable, and compare_vars() was folded into analyze_vars(). The refactor batch here is smaller than what follows.

    View source ↗
  3. 1y ago

    Risk-difference columns for subgroup tables

    Feature-led rather than refactor-led: subgroup tabulations gain a risk-difference column and format control, and incidence-rate estimation works as both an analyze and a summarize function. Predates the make_afun() migration.

    View source ↗
  4. 2y ago

    g_lineplot gains faceting and axis controls

    Plot customisation — faceting, axis limits, tick control, legend ordering — plus fixes for special characters in arm levels. Ordinary incremental work from before the architectural push.

    View source ↗