Skip to content

v0.4.0

Latest

Choose a tag to compare

@insights-engineering-bot insights-engineering-bot released this 02 Oct 13:52
· 11 commits to main since this release
1ffc491
  • modify_split_caption() now errors when given a table that was never split, instead of silently returning it unchanged. A plain table has no split level to build a subtitle from; the message points at split_by_rows = list(variable_level = ...). Pages of a row-number split are still skipped silently, as before. (#318)
  • Added add_label_column() to split a {gtsummary} table's row labels into a new left label column (label0) and the existing label column, computing the new column from an expression evaluated in the table body. This is the strata_location = "new_column" layout of tbl_shift() exposed as a standalone step for nested count and shift tables. (#314)
  • tbl_null_report() now centers its message, so with no body content it reads as a "no data" panel spanning the table instead of text hugging the left edge. (#305)
  • get_mmrm_results() gains a weights argument (default "equal") passed to emmeans::emmeans(), so proportionally weighted LS Means can be requested with weights = "proportional". Check ?emmeans::emmeans() for other weights options. (#299)
  • tbl_mmrm() gains a baseline_args argument, forwarded to the baseline tbl_roche_summary() call, to configure the baseline section statistics (previously locked to n and Mean (SE)). (#299)
  • tbl_mmrm() gains a postbaseline_args argument to select, reorder, relabel and reformat the post-baseline statistics (previously locked to n, adjusted means, differences and p-value). Built-in "geom_mean_ratio" and "geom_mean_ratio_ci" statistics are available for log-transformed responses. (#299)
  • remove_duplicate_keys() now keeps the tbl_split class and attributes when applied to a split table, instead of returning a plain list. (#301)
  • annotate_lineplot_df() gains "se" and "ci" as summary_stats options, reporting the standard error and the confidence interval of the mean (at a new conf_level argument) in the summary table below the plot. (#307)
  • gg_lineplot() gains a show_n argument to append group sizes to the legend (e.g. "Placebo (N=42)") and a jitter argument to horizontally separate overlapping groups while keeping points, lines, and error bars aligned. (#307)
  • Added tbl_proportion() to summarize a binary or multinomial variable as proportions with confidence intervals (estimate and CI on separate rows), with a selectable CI method and conf.level. The CI row label can be overridden with ci_label; the default for the continuity-corrected methods now reads "with continuity correction". (#303)
  • Added add_proportion_difference() to append the difference in rates, its confidence interval, and a p-value ("chisq", "fisher", or "cmh"), with stratified (Cochran-Mantel-Haenszel) support via strata. The correct flag controls the continuity correction on the difference interval and test_correct (default FALSE) the Yates correction on the chi-squared p-value. (#303)
  • Added add_proportion_odds_ratio() to append an odds ratio, with stratified (Cochran-Mantel-Haenszel) support via strata. (#303)
  • Added modify_split_caption() to subtitle each page of a split {gtsummary} table (e.g. from tbl_listing(), tbl_baseline_chg(), or tbl_shift()) from its split level via a glue pattern (default "Parameter: {spl_level}") and hide the now-redundant split column. (#282)
  • annotate_lineplot_df() and annotate_pkc_df() gain a font_size argument to control the summary table font size, matching annotate_riskdf(). The text_size argument of annotate_pkc_df() is soft-deprecated in favor of font_size. (#295)
  • Renamed imputation_rules() to pk_imputation_rules() to make its PK scope explicit. It applies BLQ display rules to PK summary statistics based on the BLQ ratio and dosing timing, and now marks any missing statistic (e.g. standard deviation or CV% when n = 1) as "NE" (not estimable). (#293)
  • Renamed d_pkparam() to pk_param_metadata() and h_pkparam_sort() to pk_param_sort(), dropping the d_/h_ prefixes. pk_param_sort() now warns about parameter codes missing from the reference and keeps their rows instead of dropping them silently. (#293)
  • PK summary helpers (cv(), geom_cv(), geom_mean(), fmt_3sig(), fmt_pct(), pk_imputation_rules()) now validate their inputs and raise informative errors. (#293)
  • geom_mean() returns NA_real_ instead of NaN when all concentrations are missing. (#293)
  • fmt_3sig() and fmt_pct() are now vectorized and return NA_character_ for NA or non-finite input. (#293)
  • annotate_riskdf() now builds the "Numbers at Risk" table at the plot's x-axis breaks, so custom ticks set with ggplot2::scale_x_continuous(breaks = ...) are reflected in the table. (#278)
  • theme_gtsummary_roche() now frames the flextable column labels with an outer border only, removing the internal borders between header rows and the inconsistent missing right border. (#272)
  • Fixed minor typo in the DESCRIPTION file.
  • tbl_hierarchical_incidence_rate() gains an overall_row argument to control whether the overall summary row is included. (#264)
  • tbl_hierarchical_incidence_rate() now supports add_overall() to append an unstratified column pooling all treatment arms, consistent with the other add_overall() methods in the package (last = FALSE and a glue col_label by default). (#264)
  • tbl_hierarchical_incidence_rate() now renders spanning headers for treatment arm columns, customizable via the new spanning_label glue argument (e.g. "{level} (N = {n})"). (#264)
  • tbl_with_pools() no longer strips spanning headers set by the inner .tbl_fun, so pooling tbl_baseline_chg() keeps the treatment-arm headers. (#297)

What's Changed

  • update news and description [skip vbump] by @shajoezhu in #266
  • Init; asterisks in tbl_survfit_quantiles by @jszczypinski in #267
  • feat: expose overall_row, add_overall(), and spanning headers for tbl_hierarchical_incidence_rate() by @Melkiades in #265
  • annotate_riskdf() builds risk table at the plot.s x-axis breaks by @Melkiades in #279
  • Frame flextable header column labels with an outer border only by @Melkiades in #274
  • Add myself as contributor by @llrs-roche in #285
  • feat: add position parameter to gg_add_stats for error bar adjustments by @martincadek in #276
  • Add d_pkparam() and h_pkparam_sort() for PP LTGs. by @qiliu1013 in #288
  • Add pk helper functions by @qiliu1013 in #289
  • Update imported {standalone} scripts to current source (#280) by @Melkiades in #281
  • Print method update in {cards} by @ddsjoberg in #291
  • Add modify_split_caption() to label paginated splits and hide the split column (#282) by @Melkiades in #283
  • Fix PK helper defects and add tests by @Melkiades in #294
  • Add font_size to annotate_lineplot_df() by @Melkiades in #296
  • Keep inner spanning headers in tbl_with_pools() by @Melkiades in #298
  • Center tbl_null_report() message by @Melkiades in #306
  • Add se to annotate_lineplot_df() summary table by @Melkiades in #308
  • Preserve tbl_split class in remove_duplicate_keys() by @Melkiades in #302
  • Expose emmeans weights and baseline statistics in MMRM functions by @Melkiades in #300
  • Add add_label_column() to split labels into a value column by @Melkiades in #315
  • Add tbl_proportion() and proportion comparison verbs by @Melkiades in #304
  • Error when modify_split_caption() is given an unsplit table by @Melkiades in #321
  • [skip vbump] Prepare crane 0.4.0 release candidate by @Melkiades in #320

New Contributors

Full Changelog: v0.3.2...v0.4.0