Skip to content

Commit 51c87f1

Browse files
authored
vbump to 0.9.7, prep for release [skip vbump] (#1372)
close #1281
1 parent 0186b69 commit 51c87f1

File tree

6 files changed

+23
-22
lines changed

6 files changed

+23
-22
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: tern
22
Title: Create Common TLGs Used in Clinical Trials
3-
Version: 0.9.6.9020
3+
Version: 0.9.7
44
Date: 2025-01-17
55
Authors@R: c(
66
person("Joe", "Zhu", , "joe.zhu@roche.com", role = c("aut", "cre")),

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ importFrom(grid,widthDetails)
318318
importFrom(magrittr,"%>%")
319319
importFrom(methods,new)
320320
importFrom(nestcolor,theme_nest)
321+
importFrom(rlang,"%||%")
321322
importFrom(rlang,.data)
322323
importFrom(stats,complete.cases)
323324
importFrom(stats,pchisq)

NEWS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# tern 0.9.6.9020
1+
# tern 0.9.7
22

33
### Enhancements
44
* Added the `denom` parameter to `s_count_cumulative()`, `s_count_missed_doses()`, and `s_count_occurrences_by_grade()`.
55
* Added `"N_row"` as an optional input to `denom` in `s_count_occurrences()`.
6-
* Refactored `a_count_occurrences_by_grade()`, `a_count_patients_with_event()`, and `a_count_patients_with_flags()` to no longer use `make_afun()`.
76
* Added `rel_height_plot` parameter to `g_lineplot()` to control the line plot height relative to annotation table height.
8-
* Updated the `table_font_size` parameter of `g_lineplot()` to control the size of all text in the annotation table, including labels.
97
* 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.
10-
* Refactored `summarize_change()` and `count_values()` to work without `make_afun()`.
118
* Added vignette "Understanding `tern` functions" for future reference.
12-
* Refactored `analyze_vars()` and `a_summary()` to take all options from `?rtables::additional_fun_params`.
139
* Added to `analyze_vars()` statistical names that are used by `rtables::as_result_df()`.
14-
* Merged `compare_vars()` into `analyze_vars()` as overlap was significant.
1510
* Added the possibility to integrate custom statistical functions to default ones in `analyze_vars()`.
16-
* Reworked `get_labels_from_stats()` to use a named list of levels for each statistic instead of row names.
11+
* Refactored `analyze_vars()` and `a_summary()` to take all options from `?rtables::additional_fun_params`.
12+
* Refactored `summarize_change()` and `count_values()` to work without `make_afun()`.
13+
* Refactored `a_count_occurrences_by_grade()`, `a_count_patients_with_event()`, and `a_count_patients_with_flags()` to no longer use `make_afun()`.
14+
* Refactored `get_labels_from_stats()` to use a named list of levels for each statistic instead of row names.
15+
* Updated the `table_font_size` parameter of `g_lineplot()` to control the size of all text in the annotation table, including labels.
16+
* Merged `compare_vars()` into `analyze_vars()` as overlap was significant.
1717

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

R/package.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' @importFrom methods new
1212
#' @importFrom nestcolor theme_nest
1313
#' @importFrom Rdpack reprompt
14-
#' @importFrom rlang .data
14+
#' @importFrom rlang .data %||%
1515
#' @importFrom survival coxph strata Surv
1616
#' @importFrom stats pchisq setNames complete.cases qnorm qt sd
1717
NULL

tests/testthat/test-bland-altman.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ testthat::test_that("g_bland_altman works with default settings", {
9595
)
9696
conf_level <- 0.9
9797

98-
withr::with_options(
98+
testthat::expect_silent(g_bland_altman_res <- withr::with_options(
9999
opts_partial_match_old,
100-
g_bland_altman <- g_bland_altman(x, y, conf_level = conf_level)
101-
)
100+
g_bland_altman(x, y, conf_level = conf_level)
101+
))
102102

103-
expect_snapshot_ggplot(title = "g_bland_altman", fig = g_bland_altman, width = 10, height = 8)
103+
expect_snapshot_ggplot(title = "g_bland_altman", fig = g_bland_altman_res, width = 10, height = 8)
104104
})

tests/testthat/test-g_lineplot.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ testthat::test_that("g_lineplot maintains factor levels in legend", {
6767
caption = "caption"
6868
)
6969
))
70-
7170
expect_snapshot_ggplot(title = "g_lineplot_factor_levels", fig = g_lineplot_factor_levels, width = 10, height = 8)
7271
})
72+
7373
testthat::test_that("g_lineplot does not produce a warning if group_var has >6 levels", {
7474
set.seed(1)
7575
adlb$FACTOR7 <- as.factor(sample(1:7, nrow(adlb), replace = TRUE))
@@ -84,7 +84,7 @@ testthat::test_that("g_lineplot does not produce a warning if group_var has >6 l
8484
})
8585

8686
testthat::test_that("g_lineplot works with facet_var specified", {
87-
g_lineplot_facets <- withr::with_options(
87+
testthat::expect_silent(g_lineplot_facets <- withr::with_options(
8888
opts_partial_match_old,
8989
g_lineplot(
9090
adlb,
@@ -97,34 +97,34 @@ testthat::test_that("g_lineplot works with facet_var specified", {
9797
subtitle = "Laboratory Test:",
9898
caption = "caption"
9999
)
100-
)
100+
))
101101
expect_snapshot_ggplot(title = "g_lineplot_facets", fig = g_lineplot_facets, width = 10, height = 8)
102102
})
103103

104104
testthat::test_that("g_lineplot xticks, xlim, and ylim arguments work", {
105-
g_lineplot_xticks_by <- withr::with_options(
105+
testthat::expect_silent(g_lineplot_xticks_by <- withr::with_options(
106106
opts_partial_match_old,
107107
g_lineplot(
108108
adlb,
109109
adsl,
110110
variables = control_lineplot_vars(x = "AVISITN"),
111111
xticks = 1
112112
)
113-
)
113+
))
114114
expect_snapshot_ggplot(title = "g_lineplot_xticks_by", fig = g_lineplot_xticks_by, width = 10, height = 8)
115115

116-
g_lineplot_xticks <- withr::with_options(
116+
testthat::expect_silent(g_lineplot_xticks <- withr::with_options(
117117
opts_partial_match_old,
118118
g_lineplot(
119119
adlb,
120120
adsl,
121121
variables = control_lineplot_vars(x = "AVISITN"),
122122
xticks = c(0, 2.5, 5)
123123
)
124-
)
124+
))
125125
expect_snapshot_ggplot(title = "g_lineplot_xticks", fig = g_lineplot_xticks, width = 10, height = 8)
126126

127-
g_lineplot_xlim_ylim <- withr::with_options(
127+
testthat::expect_silent(g_lineplot_xlim_ylim <- withr::with_options(
128128
opts_partial_match_old,
129129
g_lineplot(
130130
adlb,
@@ -134,7 +134,7 @@ testthat::test_that("g_lineplot xticks, xlim, and ylim arguments work", {
134134
ylim = c(17, 21),
135135
xticks = 1:6
136136
)
137-
)
137+
))
138138
expect_snapshot_ggplot(title = "g_lineplot_xlim_ylim", fig = g_lineplot_xlim_ylim, width = 10, height = 8)
139139
})
140140

0 commit comments

Comments
 (0)