Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor a_summary #983

Merged
merged 46 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9aa6358
Refactor a_summary, deprecate create_afun_summary
edelarua Jun 14, 2023
c059658
Refactor a_compare, deprecate create_afun_compare
edelarua Jun 15, 2023
6df46b9
Update pkgdown, remove browser calls
edelarua Jun 15, 2023
cf35bce
Fix extract_by_name
edelarua Jun 15, 2023
c332906
Fix NA handling
edelarua Jun 15, 2023
9a2d615
Merge branch 'main' into 966_refactor_a_summary@main
edelarua Jun 15, 2023
f2cd062
Modularize
edelarua Jun 15, 2023
6e89c20
Remove duplication (a_compare)
edelarua Jun 16, 2023
c0c783a
Add workaround for all-NA rows
edelarua Jun 16, 2023
eb62629
Add tests, fix lint, update NEWS
edelarua Jun 22, 2023
825c36f
Improve code
edelarua Jun 22, 2023
0b31e3f
Merge branch 'main' into 966_refactor_a_summary@main
edelarua Jun 22, 2023
ec7a1a3
Update stale snapshots
edelarua Jun 22, 2023
33e6671
Merge ec7a1a3855b9154a90098337d240c7063fce01f8 into d9c27e0378316dd00…
edelarua Jun 22, 2023
65572ff
[skip actions] Restyle files
github-actions[bot] Jun 22, 2023
2a870c2
Add test, update NEWS
edelarua Jun 22, 2023
9ae74bb
Merge 2a870c26b93f502c7f9a26ab68668df511b7a5ca into d9c27e0378316dd00…
edelarua Jun 22, 2023
b66be67
[skip actions] Restyle files
github-actions[bot] Jun 22, 2023
c23aeab
Update deprecated functions, roxygen
edelarua Jun 22, 2023
11d8696
Update WORDLIST
edelarua Jun 22, 2023
93fc5e1
Fix checks
edelarua Jun 22, 2023
77ccdc5
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Jul 3, 2023
a035036
Merge branch 'main' into 966_refactor_a_summary@main
edelarua Jul 4, 2023
56ccc08
Refactor, create summary customizing function
edelarua Jul 4, 2023
5987bc9
temp
edelarua Jul 4, 2023
8b38698
Fix functions, remove custom argument
edelarua Jul 4, 2023
5ce7c64
Fix tests, clean up code
edelarua Jul 4, 2023
9af0710
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jul 4, 2023
a4bcb31
Fix docs
edelarua Jul 5, 2023
e4de4be
Merge remote-tracking branch 'origin/966_refactor_a_summary@main' int…
edelarua Jul 5, 2023
a073c27
Fix checks
edelarua Jul 5, 2023
adaccca
Add examples
edelarua Jul 5, 2023
2953a5d
Update WORDLIST
edelarua Jul 5, 2023
10d4794
roxygen examples too wide
edelarua Jul 5, 2023
5d602bc
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Jul 7, 2023
4ac191b
Merge branch 'main' into 966_refactor_a_summary@main
shajoezhu Jul 8, 2023
c8b430d
Separate files for summary funs, internal afun helper
edelarua Jul 12, 2023
28b803d
Clean up a_summary and ungroup_stats, export a_compare
edelarua Jul 15, 2023
d0e341c
Update NEWS
edelarua Jul 15, 2023
62c7990
Fix tests
edelarua Jul 15, 2023
87b738a
Organize tests
edelarua Jul 21, 2023
4814842
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Jul 28, 2023
a013935
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Aug 4, 2023
3d99098
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Aug 4, 2023
0c2a850
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Aug 7, 2023
008d5f8
Merge branch 'main' into 966_refactor_a_summary@main
Melkiades Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Collate:
'summarize_glm_count.R'
'summarize_num_patients.R'
'summarize_patients_exposure_in_cols.R'
'summary_stats.R'
'survival_biomarkers_subgroups.R'
'survival_coxph_pairwise.R'
'survival_duration_subgroups.R'
Expand Down
12 changes: 4 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(a_compare,character)
S3method(a_compare,factor)
S3method(a_compare,logical)
S3method(a_compare,numeric)
S3method(a_summary,character)
S3method(a_summary,factor)
S3method(a_summary,logical)
S3method(a_summary,default)
S3method(a_summary,numeric)
S3method(as.rtable,data.frame)
S3method(h_coxreg_inter_effect,character)
Expand Down Expand Up @@ -270,7 +264,9 @@ export(summarize_num_patients)
export(summarize_occurrences_by_grade)
export(summarize_patients_events_in_cols)
export(summarize_patients_exposure_in_cols)
export(summarize_vars)
export(summary_custom)
export(summary_formats)
export(summary_labels)
export(surv_time)
export(surv_timepoint)
export(tabulate_rsp_biomarkers)
Expand Down
13 changes: 10 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
* Fix bug in `analyze_vars_in_cols` when categorical data was used.
* Removal of internal calls to `df_explicit_na`. Changes in `NA` values should happen externally to `tern` functions, depending on users' needs.

### Enhancements
* Refactored `a_summary` to no longer use helper function `create_afun_summary`.
* Refactored `summarize_vars` and `compare_vars` to use refactored `a_summary`.
* Created new internal helper functions `ungroup_stats` to ungroup statistics calculated for factor variables, and `a_summary_internal` to perform calculations for `a_summary`.

### Miscellaneous
* Started deprecation cycle for `summarize_vars` and `control_summarize_vars`. Renamed into `analyze_vars` and `control_analyze_vars` to reflect underlying `rtables` machinery while keeping backward compatibility with aliases.
Melkiades marked this conversation as resolved.
Show resolved Hide resolved

# tern 0.8.5

### Enhancements
Expand All @@ -13,9 +21,6 @@
* Added `flag_labels` argument to `s_count_patients_with_flags` to enable more label handling options in `count_patients_by_flags`.
* Added the `nested` argument to `analyze` wrapper functions `count_abnormal`, `count_abnormal_by_baseline`, `count_abnormal_by_marked`, `count_abnormal_by_worst_grade`, `count_abnormal_lab_worsen_by_baseline`, `count_cumulative`, `count_missed_doses`, `count_occurrences`, `count_occurrences_by_grade`, `count_patients_with_event`, `count_patients_with_flags`, `count_values`, `estimate_multinomial_response`, `estimate_proportion`, `estimate_incidence_rate`, `estimate_odds_ratio`, `estimate_proportion_diff`, `test_proportion_diff`, `summarize_ancova`, `summarize_change`, `summarize_glm_count`, `analyze_num_patients`, `coxph_pairwise`, `surv_time`, and `surv_timepoint`.

### Miscellaneous
* Started deprecation cycle for `summarize_vars` and `control_summarize_vars`. Renamed into `analyze_vars` and `control_analyze_vars` to reflect underlying `rtables` machinery while keeping backward compatibility with aliases.

# tern 0.8.4

### Enhancements
Expand All @@ -24,6 +29,8 @@
### Miscellaneous
* Began deprecation of `time_unit_input` and `time_unit_output` arguments and replaced them with the `input_time_unit` and `num_pt_year`, respectively, in `control_incidence_rate`.
* Removed deprecated `pairwise` function.
* Deprecated `a_compare` and replaced it with `a_summary` with argument `compare = TRUE`.
* Deprecated helper functions `create_afun_summary` and `create_afun_compare` which are no longer used by `a_summary` and `a_compare` respectively.

### Bug Fixes
* Fixed long double assertion check in `sum(weights)` for `M1mac` installation.
Expand Down
2 changes: 1 addition & 1 deletion R/analyze_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#' leverage `analyze_colvars` to have the context split in rows and the analysis
#' methods in columns.
#' * [summarize_change()]
#' * [analyze_vars()]: formerly known as [summarize_vars()], it was renamed to reflect
#' * [analyze_vars()]: formerly known as `summarize_vars()`, it was renamed to reflect
#' core function [rtables::analyze()].
#' * [surv_time()]
#' * [surv_timepoint()]
Expand Down
Loading