Skip to content

Lineplot@main#166

Merged
BFalquet merged 23 commits intomainfrom
lineplot@main
Mar 2, 2026
Merged

Lineplot@main#166
BFalquet merged 23 commits intomainfrom
lineplot@main

Conversation

@BFalquet
Copy link
Copy Markdown
Contributor

@BFalquet BFalquet commented Feb 13, 2026

This pull request introduces a new feature for generating line plots with summary statistics tables, along with supporting helper functions and documentation. The main additions are the g_lineplot(), g_lineplot_table(), and preprocess_lineplot_data() functions, which streamline the process of visualizing and summarizing numeric data in clinical trial datasets. The changes also include updates to documentation, package dependencies, and exports to ensure these new features are accessible and well-documented.

New Line Plot Functionality:

  • Added g_lineplot() for creating line plots from pre-calculated statistics, supporting stratification, error bars, and customization of colors and line types.
  • Added g_lineplot_table() for generating a ggplot-formatted table to display summary statistics beneath the main plot.
  • Added preprocess_lineplot_data() to clean, expand, join, and compute summary statistics from raw data, preparing it for plotting.

Helper Functions and Documentation:

  • Added calc_stats() for calculating N, mean, standard deviation, and confidence intervals for a numeric vector, with full documentation and examples. [1] [2]
  • Added detailed documentation for all new functions and updated the package website reference section to include them. [1] [2] [3] [4]

Package Infrastructure Updates:

  • Exported new functions and updated imports in NAMESPACE and DESCRIPTION, including dependency version bump for scales. [1] [2] [3] [4] [5]
  • Expanded inst/WORDLIST to include relevant terminology for clinical trial and plotting contexts. [1] [2]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 13, 2026

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

Comment thread tests/testthat/test-gg_lineplot-simple.R Outdated
Comment thread tests/testthat/test-gg_lineplot-simple.R Outdated
Comment thread tests/testthat/test-gg_lineplot.R Outdated
Comment thread tests/testthat/test-gg_lineplot.R Outdated
Comment thread tests/testthat/test-gg_lineplot.R Outdated
Comment thread R/gg_lineplot.R Outdated
Comment thread R/gg_lineplot.R Outdated
Comment thread R/gg_lineplot.R
Comment thread R/gg_lineplot.R Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 18, 2026

Unit Tests Summary

  1 files   81 suites   1m 53s ⏱️
 81 tests  81 ✅ 0 💤 0 ❌
228 runs  228 ✅ 0 💤 0 ❌

Results for commit f144ce7.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 18, 2026

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
gg_lineplot 👶 $+0.01$ $+13$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
gg_lineplot 👶 $+0.39$ calc_stats_works_correctly
gg_lineplot 👶 $+0.00$ g_lineplot_table_works_correctly
gg_lineplot 👶 $+0.01$ g_lineplot_works_correctly
gg_lineplot 👶 $+0.01$ preprocess_lineplot_data_works_correctly
tbl_hierarchical_rate_by_grade 💔 $2.06$ $+1.26$ tbl_hierarchical_rate_by_grade_works
tbl_survfit_quantiles 💚 $3.18$ $-1.23$ tbl_survfit_quantiles_works
tbl_survfit_times 💔 $0.26$ $+1.23$ tbl_survfit_times_works
theme_gtsummary_roche 💚 $4.51$ $-1.19$ theme_gtsummary_roche_works

Results for commit f957636

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 18, 2026

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------
R/add_blank_rows.R                        63       0  100.00%
R/add_difference_row.R                   101       0  100.00%
R/add_forest_utils.R                      97      10  89.69%   76-79, 94-100
R/add_forest.R                           137       0  100.00%
R/add_hierarchical_count_row.R            33       0  100.00%
R/annotate_gg_km.R                       145       9  93.79%   86-89, 108-112
R/crane-package.R                          2       2  0.00%    26-27
R/deprecated.R                             6       6  0.00%    15-21
R/get_cox_pairwise_df.R                   50      13  74.00%   68-71, 74-77, 82, 92-95
R/gg_km_utils.R                          102      16  84.31%   94, 134-151, 167
R/gg_km.R                                143      37  74.13%   54-57, 74, 101, 175-180, 183-186, 196-198, 203-204, 238-240, 247-250, 254, 265-269, 282, 284-286
R/gg_lineplot.R                           99       2  97.98%   145, 148
R/label_roche.R                           72       0  100.00%
R/modify_header_rm_md.R                   18       2  88.89%   35-36
R/modify_zero_recode.R                    13       0  100.00%
R/tbl_baseline_chg.R                     186       0  100.00%
R/tbl_hierarchical_rate_and_count.R      148       0  100.00%
R/tbl_hierarchical_rate_by_grade.R       271       3  98.89%   162-164
R/tbl_listing.R                           35       0  100.00%
R/tbl_null_report.R                        9       0  100.00%
R/tbl_roche_subgroups.R                  128       0  100.00%
R/tbl_roche_summary.R                     64       0  100.00%
R/tbl_shift.R                            116       0  100.00%
R/tbl_survfit_quantiles.R                132       1  99.24%   295
R/tbl_survfit_times.R                     92       0  100.00%
R/theme_gtsummary_roche.R                 78       0  100.00%
R/utils.R                                 36       0  100.00%
TOTAL                                   2376     101  95.75%

Diff against main

Filename           Stmts    Miss  Cover
---------------  -------  ------  -------
R/gg_lineplot.R      +99      +2  +97.98%
TOTAL                +99      +2  +0.10%

Results for commit: f144ce7

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@BFalquet BFalquet requested a review from Melkiades February 18, 2026 10:46
Comment thread R/gg_lineplot.R Outdated
Comment thread R/gg_lineplot.R
Comment thread _pkgdown.yml
Comment thread R/gg_lineplot.R
Comment thread R/gg_lineplot.R Outdated
@walkowif walkowif mentioned this pull request Feb 26, 2026
12 tasks
Comment thread tests/testthat/test-forestplot.R Outdated
Comment thread tests/testthat/test-gg_lineplot.R Outdated
@BFalquet BFalquet requested a review from Melkiades February 27, 2026 15:43
@BFalquet
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Copy Markdown
Contributor

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve to unblock merging

@BFalquet BFalquet merged commit 83b79b7 into main Mar 2, 2026
34 checks passed
@BFalquet BFalquet deleted the lineplot@main branch March 2, 2026 14:31
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants