From dd8f8d9c3d7493ba69e5a6b3261ab9a3fcc66983 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Wed, 25 Oct 2023 13:00:02 -0700 Subject: [PATCH 1/8] Closes #2141 Superseded `derive_param_extreme_record()` (#2174) * superseded fun * Update NEWS.md * added badge * doc update * feat: #2141 supersede section * chore: #2141 docs --------- Co-authored-by: Zelos Zhu Co-authored-by: Ben Straub --- NEWS.md | 5 +++++ R/derive_param_extreme_record.R | 8 ++++++-- _pkgdown.yml | 16 +++++----------- man/default_qtc_paramcd.Rd | 1 - man/derive_expected_records.Rd | 1 - man/derive_extreme_event.Rd | 1 - man/derive_extreme_records.Rd | 1 - man/derive_locf_records.Rd | 1 - man/derive_param_bmi.Rd | 1 - man/derive_param_bsa.Rd | 1 - man/derive_param_computed.Rd | 1 - man/derive_param_doseint.Rd | 1 - man/derive_param_exist_flag.Rd | 1 - man/derive_param_exposure.Rd | 1 - man/derive_param_extreme_record.Rd | 27 +++++---------------------- man/derive_param_framingham.Rd | 1 - man/derive_param_map.Rd | 1 - man/derive_param_qtc.Rd | 1 - man/derive_param_rr.Rd | 1 - man/derive_param_wbc_abs.Rd | 1 - man/derive_summary_records.Rd | 1 - 21 files changed, 21 insertions(+), 52 deletions(-) diff --git a/NEWS.md b/NEWS.md index 712816b14a..f4732e6a7c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -48,12 +48,17 @@ were enhanced such that more than one summary variable can be derived, e.g., - `derive_expected_records(dataset_expected_obs)` - `derive_var_ontrtfl(span_period)` +- The `derive_param_extreme_record()` function has been superseded in favor of `derive_extreme_event()`. (#2141) + ## Documentation - A way to standardize roxygen labels and descriptions for function arguments was implemented and tested (#2034) - Link to published CDISC Population PK (ADPPK) implementation guide added. (#2161) +- Removed Deprecation section in Reference tab. Added new Superseded section in +Reference tab. (#2174) + ## Various - Website now has button/links to Slack channel and GitHub Issues (#2127) diff --git a/R/derive_param_extreme_record.R b/R/derive_param_extreme_record.R index e55431b7ea..cf31b829c3 100644 --- a/R/derive_param_extreme_record.R +++ b/R/derive_param_extreme_record.R @@ -1,5 +1,9 @@ #' Adds a Parameter Based on First or Last Record from Multiple Sources #' +#' @description +#' `r lifecycle::badge("superseded")` The `derive_param_extreme_record()` +#' function has been superseded in favor of `derive_extreme_event()`. +#' #' Generates parameter based on the first or last observation from multiple #' source datasets, based on user-defined filter, order and by group criteria. #' All variables of the selected observation are kept. @@ -71,8 +75,8 @@ #' The input dataset with the first or last observation of each by group #' added as new observations. #' -#' @family der_prm_bds_findings -#' @keywords der_prm_bds_findings +#' @family superseded +#' @keywords superseded #' #' @export #' @examples diff --git a/_pkgdown.yml b/_pkgdown.yml index 9d25486b16..4e0842e54e 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -128,19 +128,13 @@ reference: contents: - has_keyword('reexport') -- title: Deprecated +- title: Superseded desc: | - As `{admiral}` is still evolving, functions/parameters may need to be removed or replaced over time. In such cases, the function/parameter will enter the following 6-month deprecation cycle: - - * In the first release (0-3 months), there will be a warning issued if you use the function/parameter, but it will still be available to use. - * In the following release (3-6 months), an error will be produced if you use the function/parameter. - * Finally, from the 3rd release (6 months) onwards, the function/parameter will be removed from `{admiral}` and its documentation completely. - - *Note: Guidance on replacement functionality can be found in the warning/error message produced or in the function's documentation.* - - Below, you can find a list of functions in the process of being deprecated: + Superseded functions have been replaced with better functions. However, we + will not be removing these functions from `{admiral}`. We do strongly + encourage you to make the switch over. contents: - - has_keyword("deprecated") + - has_keyword("superseded") navbar: structure: diff --git a/man/default_qtc_paramcd.Rd b/man/default_qtc_paramcd.Rd index ae579dc2e3..8cedfe072a 100644 --- a/man/default_qtc_paramcd.Rd +++ b/man/default_qtc_paramcd.Rd @@ -35,7 +35,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_expected_records.Rd b/man/derive_expected_records.Rd index 43bbe10b66..b66673c9dd 100644 --- a/man/derive_expected_records.Rd +++ b/man/derive_expected_records.Rd @@ -109,7 +109,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_extreme_event.Rd b/man/derive_extreme_event.Rd index e61c514891..c21de5a24c 100644 --- a/man/derive_extreme_event.Rd +++ b/man/derive_extreme_event.Rd @@ -385,7 +385,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_extreme_records.Rd b/man/derive_extreme_records.Rd index a394c9b104..48b88a38ac 100644 --- a/man/derive_extreme_records.Rd +++ b/man/derive_extreme_records.Rd @@ -302,7 +302,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_locf_records.Rd b/man/derive_locf_records.Rd index dc8cb92d95..8d606fdad4 100644 --- a/man/derive_locf_records.Rd +++ b/man/derive_locf_records.Rd @@ -135,7 +135,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_bmi.Rd b/man/derive_param_bmi.Rd index ecca7410dc..1696b634d0 100644 --- a/man/derive_param_bmi.Rd +++ b/man/derive_param_bmi.Rd @@ -178,7 +178,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_bsa.Rd b/man/derive_param_bsa.Rd index 78a98814e6..d8a3e4d5c6 100644 --- a/man/derive_param_bsa.Rd +++ b/man/derive_param_bsa.Rd @@ -203,7 +203,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_computed.Rd b/man/derive_param_computed.Rd index 88002805cb..145d7fb85c 100644 --- a/man/derive_param_computed.Rd +++ b/man/derive_param_computed.Rd @@ -309,7 +309,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_doseint.Rd b/man/derive_param_doseint.Rd index 877ac7d3ad..842ef9cc8d 100644 --- a/man/derive_param_doseint.Rd +++ b/man/derive_param_doseint.Rd @@ -148,7 +148,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_computed}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_exist_flag.Rd b/man/derive_param_exist_flag.Rd index f56fdbb032..415d4c8c28 100644 --- a/man/derive_param_exist_flag.Rd +++ b/man/derive_param_exist_flag.Rd @@ -183,7 +183,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_computed}()}, \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_exposure.Rd b/man/derive_param_exposure.Rd index c946090150..e54fd5704d 100644 --- a/man/derive_param_exposure.Rd +++ b/man/derive_param_exposure.Rd @@ -160,7 +160,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_computed}()}, \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_extreme_record.Rd b/man/derive_param_extreme_record.Rd index 6660b91d3f..3b68ae01d2 100644 --- a/man/derive_param_extreme_record.Rd +++ b/man/derive_param_extreme_record.Rd @@ -72,6 +72,9 @@ The input dataset with the first or last observation of each by group added as new observations. } \description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#superseded}{\figure{lifecycle-superseded.svg}{options: alt='[Superseded]'}}}{\strong{[Superseded]}} The \code{derive_param_extreme_record()} +function has been superseded in favor of \code{derive_extreme_event()}. + Generates parameter based on the first or last observation from multiple source datasets, based on user-defined filter, order and by group criteria. All variables of the selected observation are kept. @@ -138,25 +141,5 @@ derive_param_extreme_record( ) ) } -\seealso{ -BDS-Findings Functions for adding Parameters/Records: -\code{\link{default_qtc_paramcd}()}, -\code{\link{derive_expected_records}()}, -\code{\link{derive_extreme_event}()}, -\code{\link{derive_extreme_records}()}, -\code{\link{derive_locf_records}()}, -\code{\link{derive_param_bmi}()}, -\code{\link{derive_param_bsa}()}, -\code{\link{derive_param_computed}()}, -\code{\link{derive_param_doseint}()}, -\code{\link{derive_param_exist_flag}()}, -\code{\link{derive_param_exposure}()}, -\code{\link{derive_param_framingham}()}, -\code{\link{derive_param_map}()}, -\code{\link{derive_param_qtc}()}, -\code{\link{derive_param_rr}()}, -\code{\link{derive_param_wbc_abs}()}, -\code{\link{derive_summary_records}()} -} -\concept{der_prm_bds_findings} -\keyword{der_prm_bds_findings} +\concept{superseded} +\keyword{superseded} diff --git a/man/derive_param_framingham.Rd b/man/derive_param_framingham.Rd index 8aec00eec6..c0af0dd586 100644 --- a/man/derive_param_framingham.Rd +++ b/man/derive_param_framingham.Rd @@ -244,7 +244,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, \code{\link{derive_param_rr}()}, diff --git a/man/derive_param_map.Rd b/man/derive_param_map.Rd index 472e26bd56..40f437bd82 100644 --- a/man/derive_param_map.Rd +++ b/man/derive_param_map.Rd @@ -154,7 +154,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_qtc}()}, \code{\link{derive_param_rr}()}, diff --git a/man/derive_param_qtc.Rd b/man/derive_param_qtc.Rd index 594b7b1cd3..5840aaf545 100644 --- a/man/derive_param_qtc.Rd +++ b/man/derive_param_qtc.Rd @@ -152,7 +152,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_rr}()}, diff --git a/man/derive_param_rr.Rd b/man/derive_param_rr.Rd index ddf944a837..7ce0684b56 100644 --- a/man/derive_param_rr.Rd +++ b/man/derive_param_rr.Rd @@ -115,7 +115,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_param_wbc_abs.Rd b/man/derive_param_wbc_abs.Rd index 15c8555dc6..86b506accc 100644 --- a/man/derive_param_wbc_abs.Rd +++ b/man/derive_param_wbc_abs.Rd @@ -126,7 +126,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, diff --git a/man/derive_summary_records.Rd b/man/derive_summary_records.Rd index eba2324687..d706207c86 100644 --- a/man/derive_summary_records.Rd +++ b/man/derive_summary_records.Rd @@ -183,7 +183,6 @@ BDS-Findings Functions for adding Parameters/Records: \code{\link{derive_param_doseint}()}, \code{\link{derive_param_exist_flag}()}, \code{\link{derive_param_exposure}()}, -\code{\link{derive_param_extreme_record}()}, \code{\link{derive_param_framingham}()}, \code{\link{derive_param_map}()}, \code{\link{derive_param_qtc}()}, From ae0fcdb6eff67779b92a2b26fa32d742fd14263c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:16:31 +0200 Subject: [PATCH 2/8] update templates (#2193) * update templates * fix typo * fix style --- .github/workflows/templates.yml | 6 +++--- inst/templates/ad_adae.R | 8 ++++++-- inst/templates/ad_adcm.R | 8 ++++++-- inst/templates/ad_adeg.R | 8 ++++++-- inst/templates/ad_adex.R | 8 ++++++-- inst/templates/ad_adlb.R | 8 ++++++-- inst/templates/ad_adlbhy.R | 7 +++++++ inst/templates/ad_admh.R | 8 ++++++-- inst/templates/ad_adpc.R | 8 ++++++-- inst/templates/ad_adpp.R | 8 ++++++-- inst/templates/ad_adppk.R | 8 ++++++-- inst/templates/ad_adsl.R | 8 ++++++-- inst/templates/ad_advs.R | 8 ++++++-- 13 files changed, 76 insertions(+), 25 deletions(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index 58d8cbc9f6..dc72a4d3ad 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -1,4 +1,3 @@ ---- name: Check Templates on: @@ -6,12 +5,13 @@ on: pull_request: branches: - main - - patch + - devel jobs: templates: name: Check Templates uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main - if: github.event_name == 'pull_request' + secrets: inherit with: r-version: "4.1" + push-templates-data: true \ No newline at end of file diff --git a/inst/templates/ad_adae.R b/inst/templates/ad_adae.R index e9a5e64480..f3659ac1f3 100644 --- a/inst/templates/ad_adae.R +++ b/inst/templates/ad_adae.R @@ -133,5 +133,9 @@ adae <- adae %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adae, file = file.path(dir, "adae.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adae, file = file.path(dir, "adae.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adcm.R b/inst/templates/ad_adcm.R index 2b72783349..21a8f0091b 100644 --- a/inst/templates/ad_adcm.R +++ b/inst/templates/ad_adcm.R @@ -138,5 +138,9 @@ adcm <- adcm %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adcm, file = file.path(dir, "adcm.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adcm, file = file.path(dir, "adcm.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adeg.R b/inst/templates/ad_adeg.R index a7e4d5d7b8..a0092e1af0 100644 --- a/inst/templates/ad_adeg.R +++ b/inst/templates/ad_adeg.R @@ -330,5 +330,9 @@ adeg <- adeg %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adeg, file = file.path(dir, "adeg.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adeg, file = file.path(dir, "adeg.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adex.R b/inst/templates/ad_adex.R index aa6f5b40d3..a7d6737056 100644 --- a/inst/templates/ad_adex.R +++ b/inst/templates/ad_adex.R @@ -302,5 +302,9 @@ adex <- adex %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adex, file = file.path(dir, "adex.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adex, file = file.path(dir, "adex.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adlb.R b/inst/templates/ad_adlb.R index 99194bf71d..28e4d1bcd2 100644 --- a/inst/templates/ad_adlb.R +++ b/inst/templates/ad_adlb.R @@ -441,5 +441,9 @@ adlb <- adlb %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adlb, file = file.path(dir, "adlb.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adlb, file = file.path(dir, "adlb.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adlbhy.R b/inst/templates/ad_adlbhy.R index 7b5458a807..383bfae302 100644 --- a/inst/templates/ad_adlbhy.R +++ b/inst/templates/ad_adlbhy.R @@ -88,3 +88,10 @@ hylaw_params <- derive_param_exist_flag( # Row bind back to relevant adlb-like dataset adlbhy <- adlb_annotated %>% bind_rows(hylaw_params) + +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adlbhy, file = file.path(dir, "adlbhy.rda"), compress = "bzip2") diff --git a/inst/templates/ad_admh.R b/inst/templates/ad_admh.R index 76a8120308..26e0a457d1 100644 --- a/inst/templates/ad_admh.R +++ b/inst/templates/ad_admh.R @@ -169,5 +169,9 @@ admh <- admh %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(admh, file = file.path(dir, "admh.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admh, file = file.path(dir, "admh.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adpc.R b/inst/templates/ad_adpc.R index dc13c425f5..3e979b1396 100644 --- a/inst/templates/ad_adpc.R +++ b/inst/templates/ad_adpc.R @@ -502,5 +502,9 @@ adpc <- adpc_baselines %>% # ... # ---- Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adpc, file = file.path(dir, "adpc.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adpc, file = file.path(dir, "adcp.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adpp.R b/inst/templates/ad_adpp.R index 3bb2eeed5e..585f37d660 100644 --- a/inst/templates/ad_adpp.R +++ b/inst/templates/ad_adpp.R @@ -153,5 +153,9 @@ adpp <- adpp_avisit %>% # ... # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adpp, file = file.path(dir, "adpp.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adpp, file = file.path(dir, "adpp.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adppk.R b/inst/templates/ad_adppk.R index c16ec615b6..4eab943ee5 100644 --- a/inst/templates/ad_adppk.R +++ b/inst/templates/ad_adppk.R @@ -461,5 +461,9 @@ adppk <- adppk_aseq %>% # ... # ---- Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adppk, file = file.path(dir, "adppk.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adppk, file = file.path(dir, "adppk.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adsl.R b/inst/templates/ad_adsl.R index 161fcd87e8..400382e058 100644 --- a/inst/templates/ad_adsl.R +++ b/inst/templates/ad_adsl.R @@ -239,5 +239,9 @@ adsl <- adsl %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(adsl, file = file.path(dir, "adsl.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(adsl, file = file.path(dir, "adsl.rda"), compress = "bzip2") diff --git a/inst/templates/ad_advs.R b/inst/templates/ad_advs.R index fd630e2c47..fc3bb5b7bb 100644 --- a/inst/templates/ad_advs.R +++ b/inst/templates/ad_advs.R @@ -294,5 +294,9 @@ advs <- advs %>% # Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -saveRDS(advs, file = file.path(dir, "advs.rds"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(advs, file = file.path(dir, "advs.rda"), compress = "bzip2") From 9cb431679f84acba6f386c2cb1ebb36c7eec21b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Fran=C3=A7ois?= Date: Thu, 26 Oct 2023 15:09:38 +0200 Subject: [PATCH 3/8] use ascii quotes (#2189) * use ascii quotes * regular quoets in the associated .Rd file * 4 non ascii quotes in README.md --- R/derive_var_trtemfl.R | 2 +- README.md | 8 ++++---- man/derive_var_trtemfl.Rd | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/derive_var_trtemfl.R b/R/derive_var_trtemfl.R index ef09e50296..43553276ea 100644 --- a/R/derive_var_trtemfl.R +++ b/R/derive_var_trtemfl.R @@ -46,7 +46,7 @@ #' @param initial_intensity Initial severity/intensity or toxicity #' #' This derivation assumes AE data collection method as single record per AE -#' with “initial” and “most extreme” severity/intensity recorded separately. +#' with "initial" and "most extreme" severity/intensity recorded separately. #' #' If the argument is specified, events which start before treatment start and #' end after treatment start (or are ongoing) and worsened (i.e., the diff --git a/README.md b/README.md index c5247888e4..67b22436d9 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The `{admiral}` Q4-2023 release will officially be `{admiral}`'s version 1.0.0 r ## Main Goal Provide users with an open source, modularized toolbox with which to create ADaM datasets -in R. _As opposed to a “run 1 line and an ADaM appears” black-box solution or an attempt to +in R. _As opposed to a "run 1 line and an ADaM appears" black-box solution or an attempt to automate ADaM._ One of the key aspects of `{admiral}` is its development by the users for the users. @@ -106,7 +106,7 @@ The following packages are also useful when working with ADaM datasets: For `{admiral}` and all extension packages, we prioritize providing our users with a __simple to adopt__ toolkit that enables them to produce __readable__ and __easily constructible__ ADaM programs. The following explains our philosophy, which we try to adhere to across the `{admiral}` family of packages. -There isn’t always a clear single, straightforward rule, but there are guiding principles we adhere to for `{admiral}`. +There isn't always a clear single, straightforward rule, but there are guiding principles we adhere to for `{admiral}`. This manifesto helps show the considerations of our developers when making decisions. We have four design principles to achieve the main goal: @@ -115,7 +115,7 @@ We have four design principles to achieve the main goal: All `{admiral}` functions should be easy to use. -* Documentation is an absolute priority. Each function reference page should cover the purpose, descriptions of each argument with permitted values, the expected input and output, with clear real-life examples---so that users don’t need to dig through code to find answers. +* Documentation is an absolute priority. Each function reference page should cover the purpose, descriptions of each argument with permitted values, the expected input and output, with clear real-life examples---so that users don't need to dig through code to find answers. * Vignettes that complement the functional documentation to help users see how best the functions can be applied to achieve ADaM requirements. * Functions should be written and structured in a way that users are able to read, re-use or extend them for study specific purposes if needed (see Readability below). @@ -149,7 +149,7 @@ that all our developers and contributors must follow, so that all our code has a * We mandate use of tidyverse (e.g. dplyr) over similar functionality existing in base R. * For sections of code that perform the actual derivations (e.g. besides assertions or basic utilities), we try to limit nesting of too many dependencies or functions. -* Modularity is a focus---we don’t try to achieve too many steps in one. +* Modularity is a focus---we don't try to achieve too many steps in one. * All code has to be well commented. * We recognize that a user or a Health Authority reviewer may have the wish to delve into the code base (especially given this open source setting), or users may need to extend/adapt the code for their study specific needs. We therefore want any module to be understandable to all, not only the `{admiral}` developers. diff --git a/man/derive_var_trtemfl.Rd b/man/derive_var_trtemfl.Rd index bb97f755bc..2ffb0292dc 100644 --- a/man/derive_var_trtemfl.Rd +++ b/man/derive_var_trtemfl.Rd @@ -58,7 +58,7 @@ the event occurred more than \code{end_window} days after end of treatment. \item{initial_intensity}{Initial severity/intensity or toxicity This derivation assumes AE data collection method as single record per AE -with “initial” and “most extreme” severity/intensity recorded separately. +with "initial" and "most extreme" severity/intensity recorded separately. If the argument is specified, events which start before treatment start and end after treatment start (or are ongoing) and worsened (i.e., the From ee3e5b13b9d8f8b57bc07a035eae70b6ee5fc3c2 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:28:25 -0500 Subject: [PATCH 4/8] No multiversion docs (#2202) * No multiversion docs * Update links --- .github/workflows/common.yml | 9 +-------- NEWS.md | 24 ++++++++++++------------ README.md | 14 +++++++------- _pkgdown.yml | 2 +- inst/templates/ad_adae.R | 2 +- inst/templates/ad_adcm.R | 4 ++-- inst/templates/ad_adeg.R | 6 +++--- inst/templates/ad_adex.R | 2 +- inst/templates/ad_adlb.R | 10 +++++----- inst/templates/ad_admh.R | 4 ++-- inst/templates/ad_adpc.R | 2 +- inst/templates/ad_adpp.R | 6 +++--- inst/templates/ad_adppk.R | 2 +- inst/templates/ad_adsl.R | 4 ++-- inst/templates/ad_advs.R | 6 +++--- 15 files changed, 45 insertions(+), 52 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 01a35f6c13..aded0f9b8e 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -70,14 +70,7 @@ jobs: if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') with: r-version: "4.1" - # Whether to skip multiversion docs - # Note that if you have multiple versions of docs, - # your URL links are likely to break due to path changes - skip-multiversion-docs: false - latest-tag-alt-name: cran-release - multiversion-docs-landing-page: cran-release - branches-or-tags-to-list: >- - ^cran-release$|^v([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$ + skip-multiversion-docs: true linter: name: Lint uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main diff --git a/NEWS.md b/NEWS.md index f4732e6a7c..fb1a107be2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -725,7 +725,7 @@ updated to process additional parameter (#1125). imputation functions themselves (#1299). I.e., if a derivation like last known alive date is based on dates, DTC variables have to be converted to numeric date or datetime variables in a preprocessing step. For examples see the [ADSL -vignette](https://pharmaverse.github.io/admiral/cran-release/articles/adsl.html). +vignette](https://pharmaverse.github.io/admiral/articles/adsl.html). The following arguments were deprecated: - `date_imputation`, `time_imputation`, and `preserve` in `date_source()` @@ -824,7 +824,7 @@ empty (#1309) - `create_query_data()` is provided to create the [queries -dataset](https://pharmaverse.github.io/admiral/cran-release/articles/queries_dataset.html) required as input for `derive_vars_query()` (#606) +dataset](https://pharmaverse.github.io/admiral/articles/queries_dataset.html) required as input for `derive_vars_query()` (#606) - `create_single_dose_dataset()` - Derives dataset of single dose from aggregate dose information (#660) @@ -857,7 +857,7 @@ first disease progression. (#1023) ### ADLB - New ADLB template script available `ad_adlb.R`, specific ADLB functions developed and - [BDS Finding vignette](https://pharmaverse.github.io/admiral/cran-release/articles/bds_finding.html) has examples enhanced with ADLB functions. (#1122) + [BDS Finding vignette](https://pharmaverse.github.io/admiral/articles/bds_finding.html) has examples enhanced with ADLB functions. (#1122) - `derive_var_shift()` - Derives a character shift variable containing concatenated shift in values based on user-defined pairing (#944) - `derive_var_analysis_ratio()` - Derives a ratio variable based on user-supplied variables from a BDS dataset, e.g. ADLB. (#943) @@ -939,7 +939,7 @@ specific for admiral. Derivations like this can be implemented calling - Updated `derive_var_worst_flag()` and `derive_var_extreme_flag()` vignettes to clarify their purpose (#691) - Added example of ASEQ derivation in ADCM to -[OCCDS vignette](https://pharmaverse.github.io/admiral/cran-release/articles/occds.html#aseq) +[OCCDS vignette](https://pharmaverse.github.io/admiral/articles/occds.html#aseq) (#720) - Examples have been added for `format_reason_default()`, `format_eoxxstt_default()`, `extend_source_datasets()` and `filter_date_sources()` (#745) @@ -1039,7 +1039,7 @@ this case the day is imputed as `15` (#592) - The first truly open source release licensed under Apache 2.0 (#680) -- New vignette [Contributing to admiral](https://pharmaverse.github.io/admiral/cran-release/articles/contribution_model.html) (#679) +- New vignette [Contributing to admiral](https://pharmaverse.github.io/admiral/articles/contribution_model.html) (#679) - New vignette [Unit Test Guidance](https://pharmaverse.github.io/admiraldev/main/articles/unit_test_guidance.html) (#679) @@ -1061,7 +1061,7 @@ age in different units (#569) - `derive_param_tte()` derives time-to-event-parameters (#546) - For common time-to-event endpoints [event and censoring source -objects](https://pharmaverse.github.io/admiral/cran-release/reference/index.html#section-pre-defined-time-to-event-sources) are +objects](https://pharmaverse.github.io/admiral/reference/index.html#section-pre-defined-time-to-event-sources) are provided (#612) ### Developer @@ -1096,9 +1096,9 @@ to specify the unit of the input age (#569) ## Documentation -- New vignette [Creating a BDS Time-to-Event ADaM](https://pharmaverse.github.io/admiral/cran-release/articles/bds_tte.html) (#549) +- New vignette [Creating a BDS Time-to-Event ADaM](https://pharmaverse.github.io/admiral/articles/bds_tte.html) (#549) -- New vignette [Queries Dataset Documentation](https://pharmaverse.github.io/admiral/cran-release/articles/queries_dataset.html) (#561) +- New vignette [Queries Dataset Documentation](https://pharmaverse.github.io/admiral/articles/queries_dataset.html) (#561) - New vignette [Writing Vignettes](https://pharmaverse.github.io/admiraldev/main/articles/writing_vignettes.html) (#334) @@ -1293,10 +1293,10 @@ to specify the unit of the input age (#569) ## Documentation -- [Frequently Asked Questions](https://pharmaverse.github.io/admiral/cran-release/articles/faq.html) +- [Frequently Asked Questions](https://pharmaverse.github.io/admiral/articles/faq.html) -- [Creating ADSL](https://pharmaverse.github.io/admiral/cran-release/articles/adsl.html) +- [Creating ADSL](https://pharmaverse.github.io/admiral/articles/adsl.html) -- [Creating a BDS Finding ADaM](https://pharmaverse.github.io/admiral/cran-release/articles/bds_finding.html) +- [Creating a BDS Finding ADaM](https://pharmaverse.github.io/admiral/articles/bds_finding.html) -- [Creating an OCCDS ADaM](https://pharmaverse.github.io/admiral/cran-release/articles/occds.html) +- [Creating an OCCDS ADaM](https://pharmaverse.github.io/admiral/articles/occds.html) diff --git a/README.md b/README.md index 67b22436d9..772394cd25 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ devtools::install_github("pharmaverse/admiral") ## Release Schedule -[{admiral}](https://pharmaverse.github.io/admiral/cran-release/) releases are targeted for the first Monday of the last month of each quarter. +[{admiral}](https://pharmaverse.github.io/admiral/) releases are targeted for the first Monday of the last month of each quarter. The {admiral} family has several downstream and upstream dependencies and so this release shall be done in three Phases: @@ -44,7 +44,7 @@ Phases: | Q4-2023 | December 4th | December 11th | | | [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/main/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/main/) | | | [{admiraldev}](https://pharmaverse.github.io/admiraldev/main/) | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/) | -| | [{admiral}](https://pharmaverse.github.io/admiral/cran-release/) | | +| | [{admiral}](https://pharmaverse.github.io/admiral/) | | The `{admiral}` Q4-2023 release will officially be `{admiral}`'s version 1.0.0 release, where we commit to increased package maturity and pivot towards focusing on maintenance rather than new content. This does not mean that there will never be any new content in `{admiral}`, rather it means we will be more mindful about introducing new functionality and/or breaking changes. The release schedule in 2024 and onward will also shift to twice-yearly, rather than quarterly, so that our users have ample time to react to any new content and changes that do make it onto `{admiral}`. @@ -73,7 +73,7 @@ We will provide: * Pharmaceutical communities and companies are encouraged to contribute to `{admiral}` following the provided programming strategy and modular approach * Functions that are comprehensively documented and tested, including example calls---these are - all listed in the [Reference section](https://pharmaverse.github.io/admiral/cran-release/reference/index.html) + all listed in the [Reference section](https://pharmaverse.github.io/admiral/reference/index.html) * Vignettes on how to create ADSL, BDS and OCCDS datasets, including example scripts * Vignettes for ADaM dataset specific functionality (i.e. dictionary coding, date imputation, SMQs ...) @@ -155,12 +155,12 @@ that all our developers and contributors must follow, so that all our code has a ## References and Documentation -* Please go to [Get Started](https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html) section to start using `{admiral}` +* Please go to [Get Started](https://pharmaverse.github.io/admiral/articles/admiral.html) section to start using `{admiral}` * Please see the [pharmaverse YouTube channel](https://www.youtube.com/channel/UCxQFEv8HNqM01DXzdQLCy6Q) for videos related to `{admiral}`. * Please see the [Programming Strategy](https://pharmaverse.github.io/admiraldev/main/articles/programming_strategy.html) to understand how functions are created -* Please see the [FAQ](https://pharmaverse.github.io/admiral/cran-release/articles/faq.html) for the most frequent questions -* Please see the [Contribution Model](https://pharmaverse.github.io/admiral/cran-release/articles/contribution_model.html) for how to get involved with making contributions -* Please see [FAQ: R and Package Versions](https://pharmaverse.github.io/admiral/cran-release/articles/faq.html#why-do-we-use-a-certain-r-version-and-package-versions-for-development) for why we develop with certain R and package versions. +* Please see the [FAQ](https://pharmaverse.github.io/admiral/articles/faq.html) for the most frequent questions +* Please see the [Contribution Model](https://pharmaverse.github.io/admiral/articles/contribution_model.html) for how to get involved with making contributions +* Please see [FAQ: R and Package Versions](https://pharmaverse.github.io/admiral/articles/faq.html#why-do-we-use-a-certain-r-version-and-package-versions-for-development) for why we develop with certain R and package versions. ## Pharmaverse Blog diff --git a/_pkgdown.yml b/_pkgdown.yml index 4e0842e54e..3b9061eeae 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -19,7 +19,7 @@ development: mode: auto authors: - before: "We define *authors* as those who are actively maintaining the code base, and *contributors* as those who made a significant contribution in the past. For all acknowledgements, see the eponymous section in the [Home Page](https://pharmaverse.github.io/admiral/cran-release/)." + before: "We define *authors* as those who are actively maintaining the code base, and *contributors* as those who made a significant contribution in the past. For all acknowledgements, see the eponymous section in the [Home Page](https://pharmaverse.github.io/admiral/)." footer: roles: [aut, ctb, cre, fnd] text: "Developed by" diff --git a/inst/templates/ad_adae.R b/inst/templates/ad_adae.R index f3659ac1f3..bc11351dbb 100644 --- a/inst/templates/ad_adae.R +++ b/inst/templates/ad_adae.R @@ -24,7 +24,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint ae <- convert_blanks_to_na(ae) ex <- convert_blanks_to_na(ex_single) diff --git a/inst/templates/ad_adcm.R b/inst/templates/ad_adcm.R index 21a8f0091b..310ab11b98 100644 --- a/inst/templates/ad_adcm.R +++ b/inst/templates/ad_adcm.R @@ -22,7 +22,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint cm <- convert_blanks_to_na(cm) @@ -108,7 +108,7 @@ adcm <- adcm %>% ## Derive APHASE and APHASEN Variable ---- # Other timing variable can be derived similarly. # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html) adcm <- adcm %>% mutate( APHASE = case_when( diff --git a/inst/templates/ad_adeg.R b/inst/templates/ad_adeg.R index a0092e1af0..7df467df42 100644 --- a/inst/templates/ad_adeg.R +++ b/inst/templates/ad_adeg.R @@ -26,7 +26,7 @@ eg <- eg # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint eg <- convert_blanks_to_na(eg) @@ -172,7 +172,7 @@ adeg <- adeg %>% ## Get visit info ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#visits) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#visits) adeg <- adeg %>% # Derive Timing mutate( @@ -291,7 +291,7 @@ adeg <- adeg %>% ## Get treatment information ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_bds) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_bds) adeg <- adeg %>% # Assign TRTA, TRTP mutate(TRTP = TRT01P, TRTA = TRT01A) diff --git a/inst/templates/ad_adex.R b/inst/templates/ad_adex.R index a7d6737056..d64e0df635 100644 --- a/inst/templates/ad_adex.R +++ b/inst/templates/ad_adex.R @@ -23,7 +23,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint ex <- convert_blanks_to_na(ex) diff --git a/inst/templates/ad_adlb.R b/inst/templates/ad_adlb.R index 28e4d1bcd2..d89dc59cb2 100644 --- a/inst/templates/ad_adlb.R +++ b/inst/templates/ad_adlb.R @@ -23,7 +23,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint lb <- convert_blanks_to_na(lb) @@ -153,7 +153,7 @@ adlb <- adlb %>% ## Get Visit Info ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#visits) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#visits) adlb <- adlb %>% # Derive Timing mutate( @@ -229,7 +229,7 @@ adlb <- adlb %>% # Assign ATOXDSCL and ATOXDSCH to hold lab grading terms # ATOXDSCL and ATOXDSCH hold terms defined by NCI-CTCAEv4. -# See (https://pharmaverse.github.io/admiral/cran-release/articles/lab_grading.html#implement_ctcv4) +# See (https://pharmaverse.github.io/admiral/articles/lab_grading.html#implement_ctcv4) grade_lookup <- tibble::tribble( ~PARAMCD, ~ATOXDSCL, ~ATOXDSCH, "ALB", "Hypoalbuminemia", NA_character_, @@ -257,7 +257,7 @@ grade_lookup <- tibble::tribble( # user could change to atoxgr_criteria_ctcv5 to implement NCI-CTCAEv5 # Note: Hyperglycemia and Hypophosphatemia not defined in NCI-CTCAEv5 so # user would need to amend look-up table grade_lookup -# See (https://pharmaverse.github.io/admiral/cran-release/articles/lab_grading.html#implement_ctcv5) +# See (https://pharmaverse.github.io/admiral/articles/lab_grading.html#implement_ctcv5) grade_crit <- atoxgr_criteria_ctcv4 @@ -368,7 +368,7 @@ adlb <- adlb %>% ## Get treatment information ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_bds) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_bds) adlb <- adlb %>% # Assign TRTA, TRTP mutate( diff --git a/inst/templates/ad_admh.R b/inst/templates/ad_admh.R index 26e0a457d1..5c053f6ea6 100644 --- a/inst/templates/ad_admh.R +++ b/inst/templates/ad_admh.R @@ -122,14 +122,14 @@ admh <- mh %>% mutate(ANL01FL = ifelse(MHOCCUR != "N", "Y", NA_character_)) %>% ## Assign TRTA, TRTP (company specific variables derivation) ---- # See also the "Visit and Period Variables" vignette - # (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_bds) + # (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_bds) mutate( TRTP = TRT01P, TRTA = TRT01A ) %>% ## Assign APHASE and APHASEN Variable (company specific variable derivation) ---- # See also the "Visit and Period Variables" vignette - # (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#periods_bds) + # (https://pharmaverse.github.io/admiral/articles/visits_periods.html#periods_bds) mutate( APHASE = case_when( ADT < TRTSDT ~ "Screening", diff --git a/inst/templates/ad_adpc.R b/inst/templates/ad_adpc.R index 3e979b1396..59ef735015 100644 --- a/inst/templates/ad_adpc.R +++ b/inst/templates/ad_adpc.R @@ -32,7 +32,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint # Load EX diff --git a/inst/templates/ad_adpp.R b/inst/templates/ad_adpp.R index 585f37d660..57dcf39930 100644 --- a/inst/templates/ad_adpp.R +++ b/inst/templates/ad_adpp.R @@ -25,7 +25,7 @@ data("admiral_adsl") # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint pp <- convert_blanks_to_na(pp) @@ -117,7 +117,7 @@ adpp_aval <- adpp_pp %>% ## Get visit info ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#visit_bds) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#visit_bds) adpp_avisit <- adpp_aval %>% # Derive Timing mutate( @@ -132,7 +132,7 @@ adpp_avisit <- adpp_aval %>% ) %>% ## Assign TRTA, TRTP ---- # See also the "Visit and Period Variables" vignette - # (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_bds) + # (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_bds) mutate( TRTP = TRT01P, TRTA = TRT01A diff --git a/inst/templates/ad_adppk.R b/inst/templates/ad_adppk.R index 4eab943ee5..9407959337 100644 --- a/inst/templates/ad_adppk.R +++ b/inst/templates/ad_adppk.R @@ -30,7 +30,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint ex <- convert_blanks_to_na(ex) pc <- convert_blanks_to_na(pc) diff --git a/inst/templates/ad_adsl.R b/inst/templates/ad_adsl.R index 400382e058..a2b480f5d6 100644 --- a/inst/templates/ad_adsl.R +++ b/inst/templates/ad_adsl.R @@ -24,7 +24,7 @@ data("lb") # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint dm <- convert_blanks_to_na(dm) ds <- convert_blanks_to_na(ds) @@ -97,7 +97,7 @@ ex_ext <- ex %>% adsl <- dm %>% ## derive treatment variables (TRT01P, TRT01A) ---- # See also the "Visit and Period Variables" vignette - # (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_adsl) + # (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_adsl) mutate(TRT01P = ARM, TRT01A = ACTARM) %>% ## derive treatment start date (TRTSDTM) ---- derive_vars_merged( diff --git a/inst/templates/ad_advs.R b/inst/templates/ad_advs.R index fc3bb5b7bb..85f00152c6 100644 --- a/inst/templates/ad_advs.R +++ b/inst/templates/ad_advs.R @@ -23,7 +23,7 @@ adsl <- admiral_adsl # When SAS datasets are imported into R using haven::read_sas(), missing # character values from SAS appear as "" characters in R, instead of appearing # as NA values. Further details can be obtained via the following link: -# https://pharmaverse.github.io/admiral/cran-release/articles/admiral.html#handling-of-missing-values # nolint +# https://pharmaverse.github.io/admiral/articles/admiral.html#handling-of-missing-values # nolint vs <- convert_blanks_to_na(vs) @@ -135,7 +135,7 @@ advs <- advs %>% ## Get visit info ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#visits) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#visits) advs <- advs %>% # Derive Timing mutate( @@ -245,7 +245,7 @@ advs <- advs %>% ## Get treatment information ---- # See also the "Visit and Period Variables" vignette -# (https://pharmaverse.github.io/admiral/cran-release/articles/visits_periods.html#treatment_bds) +# (https://pharmaverse.github.io/admiral/articles/visits_periods.html#treatment_bds) advs <- advs %>% # Assign TRTA, TRTP # Create End of Treatment Record From 8e5ef2d83a6e00a21e2b0ea9b6c5e6be007df9fd Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Mon, 30 Oct 2023 14:37:32 -0700 Subject: [PATCH 5/8] Adding article with links to old website versions (#2190) --- .Rbuildignore | 1 + DESCRIPTION | 1 + vignettes/.gitignore | 2 + vignettes/articles/website-versions.Rmd | 68 +++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 vignettes/.gitignore create mode 100644 vignettes/articles/website-versions.Rmd diff --git a/.Rbuildignore b/.Rbuildignore index 25344f5555..f151bbe521 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -29,3 +29,4 @@ ^staged_dependencies.yaml$ ^inst/dev_dependencies.R$ ^\.devcontainer$ +^vignettes/articles$ diff --git a/DESCRIPTION b/DESCRIPTION index 02f6075009..15b559eeb4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -62,3 +62,4 @@ Suggests: tibble VignetteBuilder: knitr Config/testthat/edition: 3 +Config/Needs/website: gert diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 0000000000..097b241637 --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,2 @@ +*.html +*.R diff --git a/vignettes/articles/website-versions.Rmd b/vignettes/articles/website-versions.Rmd new file mode 100644 index 0000000000..e860decacd --- /dev/null +++ b/vignettes/articles/website-versions.Rmd @@ -0,0 +1,68 @@ +--- +title: "Previous Versions of Website" +--- + +```{r, include = FALSE} +# TO USE THIS ARTICLE, THE DESCRIPTION FILE MUST INCLUDE +# Config/Needs/website: gert + +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup, include=FALSE} +base_url <- + "https://pharmaverse.github.io/admiral/" # include the trailing backslash! + +# get list of all files in the `gh-pages` branch +df_all_files <- gert::git_ls(ref = "gh-pages") + +# extract all folders in the root of the branch +all_folders <- + sub("/.*", "", df_all_files$path)[grepl( + x = df_all_files$path, + pattern = "/", + fixed = TRUE + )] |> + unique() + +# subset to all version folders +all_version_folders <- all_folders[grep("^v[0-9]+", x = all_folders)] + +# release dates of prior tags +df_tags <- gert::git_tag_list() +df_tags <- df_tags[df_tags$name %in% all_version_folders, ] +df_tags$date <- + lapply( + df_tags$commit, + FUN = function(x) { + tryCatch( + gert::git_commit_info(ref = x)$time |> as.Date() |> as.character(), + error = function(x) NA + ) + } + ) |> + unlist() +df_tags <- df_tags[!is.na(df_tags$date), ] +df_tags + +lst_tag_dates <- + paste0(" (", df_tags$date, ")") |> + as.list() |> + setNames(df_tags$name) + +# string with all markdown links +str_website_links <- + lapply( + X = all_version_folders |> rev(), + FUN = function(x) { + paste0("[", x, lst_tag_dates[[x]], "](", paste0(base_url, x), ")") + } + ) |> + unlist() |> + paste(collapse = "\n\n") +``` + +`r str_website_links` From 659e16145bd3873df7a915e3ad2e5e9873beded3 Mon Sep 17 00:00:00 2001 From: cicdguy <26552821+cicdguy@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:45:21 -0500 Subject: [PATCH 6/8] Use a newer version of R for pkgdown (#2206) --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index aded0f9b8e..f9149f25e6 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -69,7 +69,7 @@ jobs: uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') with: - r-version: "4.1" + r-version: "4.3" skip-multiversion-docs: true linter: name: Lint From b8a5172ddb4936e55cc64c32fd3aa25705bde122 Mon Sep 17 00:00:00 2001 From: asha-gsk <134052893+ashachakma@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:26:06 +0530 Subject: [PATCH 7/8] Closes #2107 Updated the documentation for 'end window' argument. (#2194) #2107 Updated the documentation for 'end window' argument --- R/derive_var_trtemfl.R | 2 +- man/derive_var_trtemfl.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/derive_var_trtemfl.R b/R/derive_var_trtemfl.R index 43553276ea..0e2f28da2c 100644 --- a/R/derive_var_trtemfl.R +++ b/R/derive_var_trtemfl.R @@ -31,7 +31,7 @@ #' #' @param end_window #' -#' If the argument is specified, events starting more than the specified +#' If the argument is specified (in 'days'), events starting more than the specified #' number of days after end of treatment, are not flagged. #' #' *Permitted Values:* A non-negative integer or `NULL` diff --git a/man/derive_var_trtemfl.Rd b/man/derive_var_trtemfl.Rd index 2ffb0292dc..aa8ae90b46 100644 --- a/man/derive_var_trtemfl.Rd +++ b/man/derive_var_trtemfl.Rd @@ -45,7 +45,7 @@ the input dataset} \emph{Permitted Values:} A symbol referring to a date or datetime variable of the input dataset or \code{NULL}} -\item{end_window}{If the argument is specified, events starting more than the specified +\item{end_window}{If the argument is specified (in 'days'), events starting more than the specified number of days after end of treatment, are not flagged. \emph{Permitted Values:} A non-negative integer or \code{NULL}} From a949c19b95cd34e8d4d8a5b5ecde87c995d67386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Grasselly?= <56442075+dgrassellyb@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:24:10 +0100 Subject: [PATCH 8/8] Update templates.yml (#2210) --- .github/workflows/templates.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml index dc72a4d3ad..bffbd9f062 100644 --- a/.github/workflows/templates.yml +++ b/.github/workflows/templates.yml @@ -14,4 +14,3 @@ jobs: secrets: inherit with: r-version: "4.1" - push-templates-data: true \ No newline at end of file