Skip to content

Commit

Permalink
Refactoring of analyze_vars with specifics for .stat_names (#1361)
Browse files Browse the repository at this point in the history
# Pull Request

Fixes #1352

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joe Zhu <[email protected]>
Co-authored-by: Emily de la Rua <[email protected]>
  • Loading branch information
4 people authored Jan 16, 2025
1 parent d2b6338 commit d048143
Show file tree
Hide file tree
Showing 48 changed files with 2,056 additions and 933 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@ jobs:
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
deps-installation-method: setup-r-dependencies
lookup-refs: |
insightsengineering/nestcolor
insightsengineering/formatters
insightsengineering/rtables
default-landing-page: latest-tag
additional-unit-test-report-directories: unit-test-report-non-cran
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ URL: https://insightsengineering.github.io/tern/,
BugReports: https://github.com/insightsengineering/tern/issues
Depends:
R (>= 3.6),
rtables (>= 0.6.8)
rtables (>= 0.6.11)
Imports:
broom (>= 0.5.4),
car (>= 3.0-13),
Expand All @@ -34,7 +34,7 @@ Imports:
dplyr (>= 1.0.0),
emmeans (>= 1.10.4),
forcats (>= 1.0.0),
formatters (>= 0.5.8),
formatters (>= 0.5.10),
ggplot2 (>= 3.5.0),
grid,
gridExtra (>= 2.0.0),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export(get_formats_from_stats)
export(get_indents_from_stats)
export(get_labels_from_stats)
export(get_smooths)
export(get_stat_names)
export(get_stats)
export(groups_list_to_df)
export(h_adlb_abnormal_by_worst_grade)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
* Added `as_list` parameter to `g_lineplot()` to allow users to return the line plot and annotation table elements as a list instead of stacked for more complex customization.
* Refactored `summarize_change()` to work without `make_afun()` and access all additional function parameter.
* Added vignette "Understanding `tern` functions" for future reference.
* Refactored `analyze_vars()` and `a_summary()` to take all options from `?rtables::additional_fun_params`.
* Added to `analyze_vars()` statistical names that are used by `rtables::as_result_df()`.
* Merged `compare_vars()` into `analyze_vars()` as overlap was significant.
* Added the possibility to integrate custom statistical functions to default ones in `analyze_vars()`.
* Reworked `get_labels_from_stats()` to use a named list of levels for each statistic instead of row names.

### Bug Fixes
* Fixed bug in `a_summary()` causing non-unique `row_name` values to occur when multiple statistics are selected for count variables.

### Miscellaneous
* Reverted deprecation of quick get functions `summary_formats()` and `summary_labels()`. Added disclaimer about underlying use of `get_stats`.
* Corrected handling of extra arguments and `NA` for `summarize_change()`.
* Removed `count_fraction_fixed_dp` exception by assigning it to the result of `count_fraction` with a different format output.

# tern 0.9.6

Expand Down
Loading

0 comments on commit d048143

Please sign in to comment.