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

Adds min package version #1012

Merged
merged 15 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-strategy: ["min", "release", "max"]
test-strategy: ["min_cohort", "min_isolated", "release", "max"]
uses: insightsengineering/r.pkg.template/.github/workflows/verdepcheck.yaml@main
name: Dependency Test - ${{ matrix.test-strategy }} 🔢
secrets:
Expand Down
71 changes: 49 additions & 22 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,71 @@ Depends:
R (>= 3.6),
rtables (>= 0.6.5)
Imports:
broom,
car,
checkmate,
cowplot,
dplyr,
emmeans (>= 1.4.5),
broom (>= 0.5.4),
car (>= 3.0-13),
checkmate (>= 2.1.0),
cowplot (>= 0.7.0),
dplyr (>= 1.0.0),
emmeans (>= 1.8.0),
forcats (>= 1.0.0),
formatters (>= 0.5.4),
ggplot2 (>= 3.4.0),
grid,
gridExtra,
gtable,
gridExtra (>= 2.0.0),
gtable (>= 0.3.0),
labeling,
lifecycle,
magrittr,
lifecycle (>= 0.2.0),
magrittr (>= 1.5),
methods,
Rdpack,
rlang,
scales,
Rdpack (>= 2.4),
rlang (>= 1.1.0),
scales (>= 1.2.0),
stats,
survival (>= 3.2-13),
tibble,
tidyr,
tibble (>= 2.0.0),
tidyr (>= 0.8.3),
utils
Suggests:
knitr,
lattice,
lubridate,
knitr (>= 1.42),
lattice (>= 0.18-4),
lubridate (>= 1.7.9),
nestcolor (>= 0.1.1),
rmarkdown,
stringr,
testthat (>= 3.0),
vdiffr (>= 1.0.0)
rmarkdown (>= 2.19),
stringr (>= 1.4.1),
testthat (>= 3.1.9),
vdiffr (>= 1.0.7)
VignetteBuilder:
knitr
RdMacros:
lifecycle,
Rdpack
Config/Needs/verdepcheck:
insightsengineering/rtables,
tidymodels/broom,
cran/car,
mllg/checkmate,
wilkelab/cowplot,
tidyverse/dplyr,
rvlenth/emmeans,
tidyverse/forcats,
insightsengineering/formatters,
tidyverse/ggplot2,
r-lib/gtable,
r-lib/lifecycle,
tidyverse/magrittr,
GeoBosh/Rdpack,
r-lib/rlang,
r-lib/scales,
tidyverse/tibble,
tidyverse/tidyr,
yihui/knitr,
deepayan/lattice,
tidyverse/lubridate,
insightsengineering/nestcolor,
rstudio/rmarkdown,
tidyverse/stringr,
averissimo marked this conversation as resolved.
Show resolved Hide resolved
r-lib/testthat,
r-lib/vdiffr
Config/Needs/website: insightsengineering/nesttemplate
Config/testthat/edition: 3
Encoding: UTF-8
Expand Down
63 changes: 33 additions & 30 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# tern 0.9.2.9000

### Miscellaneous
* Specified minimal version of package dependencies.

# tern 0.9.2

### New Features
Expand Down Expand Up @@ -65,7 +68,7 @@
### Enhancements
* Added `ylim` argument to `g_km` to allow the user to set custom limits for the y-axis.
* Added assertion to `g_km` which checks whether there is one arm present in the data when `annot_coxph` is true.
* Added `flag_labels` argument to `s_count_patients_with_flags` to enable more label handling options in `count_patients_by_flags`.
* 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
Expand Down Expand Up @@ -139,19 +142,19 @@
### Enhancements
* Added `summarize_glm_count` function to analyze count data using a linear model.
* Added legend to `g_step`.
* Added formatting functions `format_fraction_fixed_dp` and
* Added formatting functions `format_fraction_fixed_dp` and
`format_count_fraction_fixed_dp` with fixed single decimal place in percentages.
* Added `na_level` and `labelstr` arguments to `summarize_vars_in_cols`.
* Added `analyze_num_patients` to include summary at the beginning that does not
repeat when paginating.
* Added `h_row_first_values` function as a more general helper function to retrieve
first values from specific rows.
* Added option to remove `"(n)"` suffix from `unique_count` labels for `s_num_patients`.
* Added options to `g_km` to annotate with statistics (`annot_stats`) and add corresponding
* Added options to `g_km` to annotate with statistics (`annot_stats`) and add corresponding
vertical lines (`annot_stats_lines`).

### Bug Fixes
* Fixed bug causing incorrect ordering of numeric grade levels when missing
* Fixed bug causing incorrect ordering of numeric grade levels when missing
grades are present in `s_count_occurrences_by_grade`.
* Refactored `summarize_vars_in_cols` to work with pagination machinery.
* Fixed bug to allow passing of `conf_level` argument to `emmeans::contrast()` in `s_ancova`.
Expand All @@ -166,11 +169,11 @@
* Added more tests to increase code coverage.
* Created separate documentation files for functions in different sections of `pkgdown` reference.
* Created separate `.R` files for logistic regression and cox regression helper functions.
* Fixed table tests using `analyze_num_patients` to generate an initial summary so there is no
* Fixed table tests using `analyze_num_patients` to generate an initial summary so there is no
repetition when paginating.
* Updated tests to use `testthat` 3rd edition and replaced applicable tests with snapshot testing.
* Updated `summarize_ancova` examples to use `iris` dataset instead of `scda` data.
* Created vignette which saves cached synthetic `CDISC` dataset files to the `data/` folder and
* Created vignette which saves cached synthetic `CDISC` dataset files to the `data/` folder and
generated cached synthetic datasets.
* Updated all examples/tests to use datasets from the `data/` folder instead of `scda` datasets.
* Removed all template tests from `tern`. These tests are in internal repo `scda.test`.
Expand All @@ -189,40 +192,40 @@
### New Features
* Added stratified `Newcombe` and stratified Wilson statistics to `estimate_proportion` and
`estimate_proportion_diff` with relative tests.
* Added `stat_mean_pval`, a new summary statistic to calculate the p-value of
* Added `stat_mean_pval`, a new summary statistic to calculate the p-value of
the mean.
* Added statistic `mean_se` (mean with standard error) for `summarize_variables`
* Added statistic `mean_se` (mean with standard error) for `summarize_variables`
and related functions.
* Introduced again `Rdpack` for references.

### Enhancements
* Redesign of data handling in tests by removing repetitive data loads and
### Enhancements
* Redesign of data handling in tests by removing repetitive data loads and
library calls.
* Added `DescTools::BinomDiffCI` function within `tern`.
* Added new parameter to `summarize_logistic` to specify which pivoted value
* Added new parameter to `summarize_logistic` to specify which pivoted value
to use during analysis.
* Updated `s_coxph_pairwise` to generate log-rank p-value using original
* Updated `s_coxph_pairwise` to generate log-rank p-value using original
log-rank test instead of Cox Proportional-Hazards Model.
* Implemented `nestcolor` in all examples by adapting `g_km`, `g_ipp`,
* Implemented `nestcolor` in all examples by adapting `g_km`, `g_ipp`,
`g_waterfall`, `g_step`, `g_lineplot`, and `g_forest`.
* Added parameters `interaction_y` and `interaction_item` in `ANCOVA` to make the
* Added parameters `interaction_y` and `interaction_item` in `ANCOVA` to make the
interaction calculations available.
* Added new parameter `footnotes` to add footnotes to `g_km`.

### Migration from `assertthat` to `checkmate`
* Implemented `checkmate::assert_vector`, `checkmate::assert_set_equal`, and
* Implemented `checkmate::assert_vector`, `checkmate::assert_set_equal`, and
`checkmate::assert_int` to check vector type, length, and values.
* Replaced with standard assertions from `checkmate` the following functions:
`all_elements_in_ref`, `is_df_with_nlevels_factor`, `is_df_with_no_na_level`,
`is_proportion_vector`, `is_quantiles_vector`, `is_character_or_factor`,
`is_nonnegative_count`, `is_valid_character`, `assert_character_or_factor`,
`all_elements_in_ref`, `is_df_with_nlevels_factor`, `is_df_with_no_na_level`,
`is_proportion_vector`, `is_quantiles_vector`, `is_character_or_factor`,
`is_nonnegative_count`, `is_valid_character`, `assert_character_or_factor`,
`assert_equal_length` and `has_tabletree_colnames`.
* Modified `is_proportion`, `is_equal_length`, `is_df_with_no_na_level`,
`is_df_with_nlevels_factor`, `is_variables`, `is_df_with_variables`,
* Modified `is_proportion`, `is_equal_length`, `is_df_with_no_na_level`,
`is_df_with_nlevels_factor`, `is_variables`, `is_df_with_variables`,
`is_df_with_factors`, `is_valid_factor` to use assertion logic.
* Added more verbose warnings from `as_factor_keep_attributes`.
* Made `assert_df_with_factors` and `assert_proportion_value` internal functions.
* Renamed `assertthat.R` and `test-assertthat.R` to `utils_checkmate.R` and
* Renamed `assertthat.R` and `test-assertthat.R` to `utils_checkmate.R` and
`test-utils_checkmate.R`.

### Documentation and NAMESPACE Polishing
Expand Down Expand Up @@ -252,7 +255,7 @@
`estimate_multinomial_rsp`, `decorate_grob_set`, `extreme_format`, `fit_rsp_step`,
`fit_survival_step`, `footnotes`, `footnotes-set`,
`format_count_fraction`, `format_fraction_threshold`, `formatting_functions`,
`format_fraction`, `combination_function` (S4 method), `compare_variables` (S3 method),
`format_fraction`, `combination_function` (S4 method), `compare_variables` (S3 method),
`kaplan_meier`.
* Internal keywords added, export removed, `_pkgdown.yml` updated, and `tern:::` added for
tests/examples/vignettes where present for the following functions:
Expand Down Expand Up @@ -287,24 +290,24 @@
* Fixed empty vector exception for `cut_quantile_bins`.
* Fixed exception error when empty strings are present in pivoted columns (`rtables` split
functions)
* Fixed bug in `s_ancova` causing an error when the first level of the arm
factor is not the control arm.
* Fixed bug in `s_ancova` causing an error when the first level of the arm
factor is not the control arm.
* Fixed bug in `s_abnormal_by_worst_grade` when there is one `PARAM` level.
* Fixed bug in `prop_diff_wald` when selecting all responders, updated tests accordingly.
* Fixed bug in `h_ancova` that caused an error when deselecting all covariates.

### Miscellaneous
* Added deprecated badge to `g_mmrm`.
* Removed internal function calls in examples (`tern:::`) and added `dontrun`
* Removed internal function calls in examples (`tern:::`) and added `dontrun`
to internal function examples.
* Removed warnings and messages to console occurring in examples and tests.
* Deprecated functions `color_palette` and `h_set_nest_theme` in favor of
* Deprecated functions `color_palette` and `h_set_nest_theme` in favor of
`nestcolor::color_palette` and `nestcolor::theme_nest`, respectively.
* Removed deprecated functions: `color_palette`, `color_palette_core`,
* Removed deprecated functions: `color_palette`, `color_palette_core`,
`h_set_nest_theme`, `s_cox_univariate`.
* Removed deprecated `mmrm` functions: `fit_mmrm`, `g_mmrm_diagnostic`,
`g_mmrm_lsmeans`, `as.rtable.mmrm`, `h_mmrm_fixed`, `h_mmrm_cov`,
`h_mmrm_diagnostic`, `tidy.mmrm`, `s_mmrm_lsmeans`, `s_mmrm_lsmeans_single`,
* Removed deprecated `mmrm` functions: `fit_mmrm`, `g_mmrm_diagnostic`,
`g_mmrm_lsmeans`, `as.rtable.mmrm`, `h_mmrm_fixed`, `h_mmrm_cov`,
`h_mmrm_diagnostic`, `tidy.mmrm`, `s_mmrm_lsmeans`, `s_mmrm_lsmeans_single`,
`summarize_lsmeans`.
* Renamed functions `arm` to `study_arm` and `extract` to `extract_by_name`.
* Renamed `rtables.R` to `utils_rtables.R`.
Expand Down
Loading