← Back to all sparks
C

clinify

ANALYTICS
Velocity2.5

Extensions and helper functions working with flextable objects for creating clinical reports

Clinical-table typesetting for R, closing the gap between R output and regulatory Word documents

clinical-trialsr-packagedocument-generationtable-formattingregulatory-reporting
Current state
clinify renders clinical trial tables into Word documents through {officer}, aiming at the layout conventions regulatory submissions expect. 0.4.0 is the current CRAN release and folds in an unreleased 0.3.1. The recent work is almost entirely about header and spacing control: which adjacent header cells merge, where the rule under a spanner starts and stops, and how much vertical space sits above, below and between header rows and the table body.
Where it's heading
The package is moving from producing a correct table toward producing one that survives an organisation's house style. 0.4.0's additions are all written to hold under a customised `clinify_table_default()` — `clin_spanner_rule()` draws after the default styling function so it persists when a house style clears the borders it started from, and takes an `officer::fp_border()` or `FALSE` so a style can decline the rule entirely. The earlier 0.3.0 line did the structural work, introducing `clindoc()` document objects that accept multiple tables plus automatic pagination.
Prediction
Expect continued refinement of layout primitives that follow the table rather than fixed column numbers, since both new 0.4.0 functions were built specifically to track spanners and headers as a layout changes. The entries do not indicate a move beyond Word output.

Recent moves

  1. 13d ago

    Finer header merging, spanner rules and header padding

    Header and spacing control gets much finer: `clin_column_headers()` gains a `merge` argument (including `"spanners"` and per-row vectors) and can be called with merge alone to adjust headers already in place. New `clin_spanner_rule()` draws a rule spanning only the columns a spanner covers, and `clin_header_pad()` sets space above, below and between header rows and the body. Both are written to survive an organisation's own default styling function.

    View source ↗
  2. 1y ago

    clindoc document objects and automatic pagination

    The structural release that the 0.4.0 layout work sits on top of, bundling an unreleased 0.2.0. It introduced `clindoc()` document objects accepting multiple tables, automatic pagination via Word's `keep_with_next`, and grouped page numbers. It carries three breaking changes: `write_clintable()` became `write_clindoc()`, titles and footnotes now split into only two parts, and `clin_auto_page()` gained a `page_by`-dropping option.

    View source ↗