Skip to content

Commit

Permalink
Merge branch 'main' into 233_iRECIST_vignette_main
Browse files Browse the repository at this point in the history
  • Loading branch information
bundfussr committed Dec 12, 2023
2 parents 070e058 + 6e4b6cb commit 1b6857c
Show file tree
Hide file tree
Showing 33 changed files with 520 additions and 668 deletions.
12 changes: 10 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Thank you for your Pull Request! We have developed this task checklist from the [Development Process Guide](https://pharmaverse.github.io/admiraldev/articles/development_process.html) to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Thank you for your Pull Request! We have developed this task checklist from the
[Development Process
Guide](https://pharmaverse.github.io/admiral/CONTRIBUTING.html#detailed-development-process)
to help with the final steps of the process. Completing the below tasks helps to
ensure our reviewers can maximize their time on your code as well as making sure
the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `main` branch until you have checked off each task.
Please check off each taskbox as an acknowledgment that you completed the task
or check off that it is not relevant to your Pull Request. This checklist is
part of the Github Action workflows and the Pull Request will not be merged into
the `main` branch until you have checked off each task.

- [ ] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update). Then the issue is closed automatically once it is merged to `main`.
- [ ] Code is formatted according to the [tidyverse style guide](https://style.tidyverse.org/). Run `styler::style_file()` to style R and Rmd files
Expand Down
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ Suggests:
DT
VignetteBuilder: knitr
Config/testthat/edition: 3
Config/Needs/website: gert
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export(bor_non_crpd)
export(bor_pd)
export(bor_pr)
export(bor_sd)
export(call_aval_fun)
export(cb_y)
export(cbor_cr)
export(cbor_pr)
Expand Down
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@

- Website now has button/links to Slack channel and GitHub Issues. (#262)

## Documentation

- All vignettes and templates were updated to be in line with the changes in
`{admiral}` (see [Breaking
Changes](https://pharmaverse.github.io/admiral/news/index.html#breaking-changes-1-0-0)
for details)(#256).

## Breaking Changes

- The `derive_*()` functions were superseded in favor of
`derive_extreme_event()`. Any superseded functions can continue to be used as
demonstrated via the "Basic ADRS" vignette, as they will remain supported and
won't be deprecated in the near future. (#256)

- The `filter_pd()` function was superseded in favor of `filter_relative()`. (#256)

- The function `call_aval_fun()`, which was deprecated in admiralonco 0.4.0,
has been removed. (#256)

# admiralonco 0.5.0

## New Features
Expand Down
9 changes: 6 additions & 3 deletions R/derive_param_bor.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' Adds a Parameter for Best Overall Response (without confirmation)
#'
#' @description
#' `r lifecycle::badge("superseded")` The `derive_param_bor()` function has been
#' superseded in favor of `derive_extreme_event()`.
#'
#' Adds a parameter for best overall response, without confirmation, optionally up to
#' first progressive disease
#'
Expand Down Expand Up @@ -252,9 +256,8 @@
#'
#' @author Stephen Gormley
#'
#' @family der_prm_adrs
#'
#' @keywords der_prm_adrs
#' @family superseded
#' @keywords superseded
#'
#' @return The dataframe passed in the `dataset` argument with additional columns and/or
#' rows as set in the `set_values_to` argument.
Expand Down
9 changes: 6 additions & 3 deletions R/derive_param_clinbenefit.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' Adds a Parameter for Clinical Benefit
#'
#' @description
#' `r lifecycle::badge("superseded")` The `derive_param_clinbenefit()` function
#' has been superseded in favor of `derive_extreme_event()`.
#'
#' Adds a parameter for clinical benefit/disease control
#'
#' @details
Expand Down Expand Up @@ -114,9 +118,8 @@
#'
#' @return The input dataset with a new parameter for clinical benefit
#'
#' @family der_prm_adrs
#'
#' @keywords der_prm_adrs
#' @family superseded
#' @keywords superseded
#'
#' @export
#'
Expand Down
23 changes: 13 additions & 10 deletions R/derive_param_confirmed_bor.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' Adds a Parameter for Confirmed Best Overall Response
#'
#' @description
#' `r lifecycle::badge("superseded")` The `derive_param_confirmed_bor()`
#' function has been superseded in favor of `derive_extreme_event()`.
#'
#' Adds a parameter for confirmed best overall response (BOR)
#'
#' @param dataset Input dataset
Expand Down Expand Up @@ -187,9 +191,8 @@
#' @return The input dataset with a new parameter for confirmed best overall
#' response
#'
#' @family der_prm_adrs
#'
#' @keywords der_prm_adrs
#' @family superseded
#' @keywords superseded
#'
#' @author Stefan Bundfuss
#'
Expand Down Expand Up @@ -419,7 +422,7 @@ derive_param_confirmed_bor <- function(dataset,
ADT.join >= ADT + days(!!ref_confirm),
filter_join = AVALC == "CR" &
all(AVALC.join %in% c("CR", "NE")) &
count_vals(var = AVALC.join, val = "NE") <= !!max_nr_ne
{{ count_vals }}(var = AVALC.join, val = "NE") <= !!max_nr_ne
) %>%
mutate(tmp_order = 1)

Expand All @@ -439,15 +442,15 @@ derive_param_confirmed_bor <- function(dataset,
ADT.join >= ADT + days(!!ref_confirm),
filter_join = AVALC == "PR" &
all(AVALC.join %in% c("CR", "PR", "SD", "NE")) &
count_vals(var = AVALC.join, val = "NE") <= !!max_nr_ne &
count_vals(var = AVALC.join, val = "SD") <= !!max_nr_sd &
{{ count_vals }}(var = AVALC.join, val = "NE") <= !!max_nr_ne &
{{ count_vals }}(var = AVALC.join, val = "SD") <= !!max_nr_sd &
(
min_cond(
{{ min_cond }}(
var = ADT.join,
cond = AVALC.join == "CR"
) > max_cond(var = ADT.join, cond = AVALC.join == "PR") |
count_vals(var = AVALC.join, val = "CR") == 0 |
count_vals(var = AVALC.join, val = "PR") == 0
) > {{ max_cond }}(var = ADT.join, cond = AVALC.join == "PR") |
{{ count_vals }}(var = AVALC.join, val = "CR") == 0 |
{{ count_vals }}(var = AVALC.join, val = "PR") == 0
)
) %>%
mutate(tmp_order = 2)
Expand Down
23 changes: 13 additions & 10 deletions R/derive_param_confirmed_resp.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' Adds a Parameter for Confirmed Response
#'
#' @description
#' `r lifecycle::badge("superseded")` The `derive_param_confirmed_resp()`
#' function has been superseded in favor of `derive_extreme_event()`.
#'
#' Adds a parameter for confirmed response
#'
#' @param dataset Input dataset
Expand Down Expand Up @@ -135,9 +139,8 @@
#'
#' @return The input dataset with a new parameter for confirmed response
#'
#' @family der_prm_adrs
#'
#' @keywords der_prm_adrs
#' @family superseded
#' @keywords superseded
#'
#' @author Stefan Bundfuss
#'
Expand Down Expand Up @@ -351,7 +354,7 @@ derive_param_confirmed_resp <- function(dataset,
ADT.join >= ADT + days(!!ref_confirm),
filter_join = AVALC == "CR" &
all(AVALC.join %in% c("CR", "NE")) &
count_vals(var = AVALC.join, val = "NE") <= !!max_nr_ne
{{ count_vals }}(var = AVALC.join, val = "NE") <= !!max_nr_ne
) %>%
mutate(
AVALC = "Y"
Expand All @@ -373,15 +376,15 @@ derive_param_confirmed_resp <- function(dataset,
ADT.join >= ADT + days(!!ref_confirm),
filter_join = AVALC == "PR" &
all(AVALC.join %in% c("CR", "PR", "SD", "NE")) &
count_vals(var = AVALC.join, val = "NE") <= !!max_nr_ne &
count_vals(var = AVALC.join, val = "SD") <= !!max_nr_sd &
{{ count_vals }}(var = AVALC.join, val = "NE") <= !!max_nr_ne &
{{ count_vals }}(var = AVALC.join, val = "SD") <= !!max_nr_sd &
(
min_cond(
{{ min_cond }}(
var = ADT.join,
cond = AVALC.join == "CR"
) > max_cond(var = ADT.join, cond = AVALC.join == "PR") |
count_vals(var = AVALC.join, val = "CR") == 0 |
count_vals(var = AVALC.join, val = "PR") == 0
) > {{ max_cond }}(var = ADT.join, cond = AVALC.join == "PR") |
{{ count_vals }}(var = AVALC.join, val = "CR") == 0 |
{{ count_vals }}(var = AVALC.join, val = "PR") == 0
)
) %>%
mutate(
Expand Down
9 changes: 6 additions & 3 deletions R/derive_param_response.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#' Adds a Parameter Indicating If a Subject Had a Response before Progressive
#' Disease
#'
#' @description
#' `r lifecycle::badge("superseded")` The `derive_param_response()` function has
#' been superseded in favor of `derive_extreme_event()`.
#'
#' Adds a parameter indicating if a response has been observed.
#' If a response has been observed, `AVALC` is set to "Y", `AVAL` to 1 and `ADT`
#' is set to the
Expand Down Expand Up @@ -104,9 +108,8 @@
#' @return The input dataset with a new parameter indicating if and when a
#' response occurred
#'
#' @family der_prm_adrs
#'
#' @keywords der_prm_adrs
#' @family superseded
#' @keywords superseded
#'
#' @export
#'
Expand Down
8 changes: 6 additions & 2 deletions R/filter_pd.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' Filter up to First PD (Progressive Disease) Date
#'
#' @description
#' `r lifecycle::badge("superseded")` The `filter_pd()` function has been
#' superseded in favor of `filter_relative()`.
#'
#' Filter a dataset to only include the source parameter records up to and
#' including the first PD (progressive disease). These records are passed to
#' downstream derivations regarding responses such as BOR (best overall
Expand Down Expand Up @@ -45,8 +49,8 @@
#'
#' @export
#'
#' @keywords utils_fil
#' @family utils_fil
#' @family superseded
#' @keywords superseded
#'
#' @examples
#'
Expand Down
8 changes: 4 additions & 4 deletions R/response_sources.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ crsp_y_cr <- event_joined(
join_vars = exprs(AVALC, ADT),
join_type = "after",
order = exprs(ADT),
first_cond = AVALC.join == "CR" &
first_cond_upper = AVALC.join == "CR" &
ADT.join >= ADT + days(28),
condition = AVALC == "CR" &
all(AVALC.join %in% c("CR", "NE")) &
Expand All @@ -193,7 +193,7 @@ crsp_y_pr <- event_joined(
join_vars = exprs(AVALC, ADT),
join_type = "after",
order = exprs(ADT),
first_cond = AVALC.join %in% c("CR", "PR") &
first_cond_upper = AVALC.join %in% c("CR", "PR") &
ADT.join >= ADT + days(28),
condition = AVALC == "PR" &
all(AVALC.join %in% c("CR", "PR", "NE")) &
Expand Down Expand Up @@ -221,7 +221,7 @@ cbor_cr <- event_joined(
dataset_name = "ovr",
join_vars = exprs(AVALC, ADT),
join_type = "after",
first_cond = AVALC.join == "CR" &
first_cond_upper = AVALC.join == "CR" &
ADT.join >= ADT + 28,
condition = AVALC == "CR" &
all(AVALC.join %in% c("CR", "NE")) &
Expand All @@ -242,7 +242,7 @@ cbor_pr <- event_joined(
dataset_name = "ovr",
join_vars = exprs(AVALC, ADT),
join_type = "after",
first_cond = AVALC.join %in% c("CR", "PR") &
first_cond_upper = AVALC.join %in% c("CR", "PR") &
ADT.join >= ADT + 28,
condition = AVALC == "PR" &
all(AVALC.join %in% c("CR", "PR", "NE")) &
Expand Down
58 changes: 0 additions & 58 deletions R/utils.R

This file was deleted.

Loading

0 comments on commit 1b6857c

Please sign in to comment.