Skip to content
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
4 changes: 2 additions & 2 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
linters: linters_with_defaults(
line_length_linter = line_length_linter(120),
cyclocomp_linter = NULL,
object_usage_linter = NULL
object_usage_linter = NULL,
pipe_consistency_linter = NULL
)
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: chevron
Title: Standard TLGs for Clinical Trials Reporting
Version: 0.2.15.9000
Version: 0.2.16
Date: 2026-10-28
Authors@R: c(
person("Liming", "Li", , "liming.li@roche.com", role = "aut",
Expand Down Expand Up @@ -72,7 +72,7 @@ Config/Needs/verdepcheck: mllg/checkmate, tidyverse/dplyr,
yihui/knitr, rstudio/rmarkdown, r-lib/testthat, tidyverse/tidyr,
r-lib/vdiffr, r-lib/withr
Config/Needs/website: insightsengineering/nesttemplate
Config/roxygen2/version: 8.1.0
Config/roxygen2/version: 8.1.1
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
Expand Down
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# chevron 0.2.15.9000
# chevron 0.2.16

* Updated `rspt01` tests and documentation for `tern` >= 0.9.12, which no longer accepts `"ha"` and `"schouten"` as stratified methods; the examples now use `"cmh_sato"`.
* Converted the derived `*_main` functions of `cmt02_pt`, `coxt02`, `egt01`, `egt02_2`, `rmpt03`, `rmpt04`, `rmpt05`, `vst01` and `vst02` from `modify_default_args()` wrappers into explicit forwarding functions so their requirements are picked up by the test traceability report (no change to output).

# chevron 0.2.15

* Skip test to avoid cran check fails for tern.
* Skip test to avoid CRAN check fails for tern.

# chevron 0.2.14

Expand Down
22 changes: 17 additions & 5 deletions R/cmt02_pt.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@
#' @returns the main function returns an `rtables` object.
#' @export
#'
cmt02_pt_main <- modify_default_args(
cmt01a_main,
row_split_var = NULL,
summary_labels = quote(list(TOTAL = cmt01_label))
)
cmt02_pt_main <- function(adam_db,
arm_var = "ARM",
lbl_overall = NULL,
row_split_var = NULL,
medname_var = "CMDECOD",
summary_labels = list(TOTAL = cmt01_label),
...) {
cmt01a_main(
adam_db = adam_db,
arm_var = arm_var,
lbl_overall = lbl_overall,
row_split_var = row_split_var,
medname_var = medname_var,
summary_labels = summary_labels,
...
)
}

#' @describeIn cmt02_pt Preprocessing
#'
Expand Down
22 changes: 21 additions & 1 deletion R/coxt02.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,27 @@
#'
#' @export
#'
coxt02_main <- modify_default_args(coxt01_main, multivar = TRUE)
coxt02_main <- function(adam_db,
arm_var = "ARM",
time_var = "AVAL",
event_var = "EVENT",
covariates = c("SEX", "RACE", "AAGE"),
strata = NULL,
lbl_vars = "Effect/Covariate Included in the Model",
multivar = TRUE,
...) {
coxt01_main(
adam_db = adam_db,
arm_var = arm_var,
time_var = time_var,
event_var = event_var,
covariates = covariates,
strata = strata,
lbl_vars = lbl_vars,
multivar = multivar,
...
)
}

#' `COXT02` Multi-Variable Cox Regression Model Table.
#'
Expand Down
28 changes: 27 additions & 1 deletion R/egt01.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,33 @@
#'
#' @export
#'
egt01_main <- modify_default_args(cfbt01_main, dataset = "adeg", precision = quote(list(default = 0L)))
egt01_main <- function(adam_db,
dataset = "adeg",
arm_var = "ACTARM",
lbl_overall = NULL,
row_split_var = NULL,
summaryvars = c("AVAL", "CHG"),
visitvar = "AVISIT",
precision = list(default = 0L),
page_var = "PARAMCD",
.stats = c("n", "mean_sd", "median", "range"),
skip = list(CHG = "BASELINE"),
...) {
cfbt01_main(
adam_db = adam_db,
dataset = dataset,
arm_var = arm_var,
lbl_overall = lbl_overall,
row_split_var = row_split_var,
summaryvars = summaryvars,
visitvar = visitvar,
precision = precision,
page_var = page_var,
.stats = .stats,
skip = skip,
...
)
}

#' @describeIn egt01 Preprocessing
#'
Expand Down
14 changes: 13 additions & 1 deletion R/egt02.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,19 @@ egt02_1 <- chevron_t(
#'
#' @export
#'
egt02_2_main <- modify_default_args(egt02_1_main, exclude_base_abn = TRUE)
egt02_2_main <- function(adam_db,
arm_var = "ACTARM",
lbl_overall = NULL,
exclude_base_abn = TRUE,
...) {
egt02_1_main(
adam_db = adam_db,
arm_var = arm_var,
lbl_overall = lbl_overall,
exclude_base_abn = exclude_base_abn,
...
)
}

#' `EGT02_2` ECG Abnormalities Table.
#'
Expand Down
23 changes: 17 additions & 6 deletions R/rmpt03.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@
#'
#' @export
#'
rmpt03_main <- modify_default_args(
rmpt01_main,
summaryvars = "AGEGR1",
col_split_var = "SEX",
overall_col_lbl = "All Genders"
)
rmpt03_main <- function(adam_db,
summaryvars = "AGEGR1",
show_tot = TRUE,
row_split_var = NULL,
col_split_var = "SEX",
overall_col_lbl = "All Genders",
...) {
rmpt01_main(
adam_db = adam_db,
summaryvars = summaryvars,
show_tot = show_tot,
row_split_var = row_split_var,
col_split_var = col_split_var,
overall_col_lbl = overall_col_lbl,
...
)
}

#' @describeIn rmpt03 Preprocessing
#'
Expand Down
18 changes: 17 additions & 1 deletion R/rmpt04.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,23 @@
#'
#' @export
#'
rmpt04_main <- modify_default_args(rmpt01_main, summaryvars = "ETHNIC")
rmpt04_main <- function(adam_db,
summaryvars = "ETHNIC",
show_tot = TRUE,
row_split_var = NULL,
col_split_var = NULL,
overall_col_lbl = NULL,
...) {
rmpt01_main(
adam_db = adam_db,
summaryvars = summaryvars,
show_tot = show_tot,
row_split_var = row_split_var,
col_split_var = col_split_var,
overall_col_lbl = overall_col_lbl,
...
)
}

#' @describeIn rmpt04 Preprocessing
#'
Expand Down
18 changes: 17 additions & 1 deletion R/rmpt05.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,23 @@
#'
#' @export
#'
rmpt05_main <- modify_default_args(rmpt01_main, summaryvars = "RACE")
rmpt05_main <- function(adam_db,
summaryvars = "RACE",
show_tot = TRUE,
row_split_var = NULL,
col_split_var = NULL,
overall_col_lbl = NULL,
...) {
rmpt01_main(
adam_db = adam_db,
summaryvars = summaryvars,
show_tot = show_tot,
row_split_var = row_split_var,
col_split_var = col_split_var,
overall_col_lbl = overall_col_lbl,
...
)
}

#' @describeIn rmpt05 Preprocessing
#'
Expand Down
4 changes: 2 additions & 2 deletions R/rspt01.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#' @param methods (`list`) a named list, use a named list to control, for example:
#' `methods = list(prop_conf_method = "wald",
#' diff_conf_method = "wald",
#' strat_diff_conf_method = "ha",
#' strat_diff_conf_method = "cmh_sato",
#' diff_pval_method = "fisher",
#' strat_diff_pval_method = "schouten")`
#' strat_diff_pval_method = "cmh_sato")`
#' `prop_conf_method` controls the methods of calculating proportion confidence interval,
#' `diff_conf_method` controls the methods of calculating unstratified difference confidence interval,
#' `strat_diff_conf_method` controls the methods of calculating stratified difference confidence interval,
Expand Down
32 changes: 27 additions & 5 deletions R/vst01.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,33 @@
#'
#' @export
#'
vst01_main <- modify_default_args(
cfbt01_main,
dataset = "advs",
precision = quote(list(DIABP = 0, PUL = 0, SYSBP = 0, default = 2L))
)
vst01_main <- function(adam_db,
dataset = "advs",
arm_var = "ACTARM",
lbl_overall = NULL,
row_split_var = NULL,
summaryvars = c("AVAL", "CHG"),
visitvar = "AVISIT",
precision = list(DIABP = 0, PUL = 0, SYSBP = 0, default = 2L),
page_var = "PARAMCD",
.stats = c("n", "mean_sd", "median", "range"),
skip = list(CHG = "BASELINE"),
...) {
cfbt01_main(
adam_db = adam_db,
dataset = dataset,
arm_var = arm_var,
lbl_overall = lbl_overall,
row_split_var = row_split_var,
summaryvars = summaryvars,
visitvar = visitvar,
precision = precision,
page_var = page_var,
.stats = .stats,
skip = skip,
...
)
}

#' @describeIn vst01 Preprocessing
#'
Expand Down
14 changes: 13 additions & 1 deletion R/vst02.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,19 @@ vst02_1 <- chevron_t(
#'
#' @export
#'
vst02_2_main <- modify_default_args(vst02_1_main, exclude_base_abn = TRUE)
vst02_2_main <- function(adam_db,
arm_var = "ACTARM",
lbl_overall = NULL,
exclude_base_abn = TRUE,
...) {
vst02_1_main(
adam_db = adam_db,
arm_var = arm_var,
lbl_overall = lbl_overall,
exclude_base_abn = exclude_base_abn,
...
)
}
#' `VST02` Vital Sign Abnormalities Table.
#'
#' Vital Sign Parameters outside Normal Limits Among Patients without Abnormality at Baseline.
Expand Down
2 changes: 1 addition & 1 deletion man/proportion_lyt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/rspt01.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading