diff --git a/DESCRIPTION b/DESCRIPTION index 104ff525b7..096b2f1b85 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: admiral Title: ADaM in R Asset Library -Version: 1.1.1.9058 +Version: 1.2.0 Authors@R: c( person("Ben", "Straub", , "ben.x.straub@gsk.com", role = c("aut", "cre")), person("Stefan", "Bundfuss", role = "aut", @@ -40,7 +40,7 @@ URL: https://pharmaverse.github.io/admiral/, https://github.com/pharmaverse/admiral BugReports: https://github.com/pharmaverse/admiral/issues Depends: - R (>= 4.0) + R (>= 4.1) Imports: admiraldev (>= 1.1.0.9007), cli (>= 3.6.2), @@ -69,8 +69,6 @@ Suggests: withr VignetteBuilder: knitr -Remotes: - pharmaverse/admiraldev Config/Needs/website: gert Config/testthat/edition: 3 Encoding: UTF-8 diff --git a/NEWS.md b/NEWS.md index 1b3f978a5a..717e18616e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# admiral (development version) +# admiral 1.2.0 ## New Features @@ -8,19 +8,16 @@ (`CRITy`, `CRITyFL`, `CRITyFN`). (#2468) - New function `transform_range()` to transform values from a source range to a target range. (#2571) -- Replace use of `data("sdtm")` with `sdtm <- pharmaverse::sdtm` in templates and vignettes. (#2498) - -- Remove `dthcaus_source()` calls in `ADSL` template because they are deprecated. (#2517) -- Update `ADEG` template to flag `ABLFL` and `ANL01FL` based on `DTYPE == "AVERAGE"` records. (#2561) ## Updates of Existing Functions -- added `"message"` as option for `check_type` argument in `derive_var_obs_number()` function. (#2481) -- added `"message"` as option for `check_type` argument in `filter_extreme()` function. (#2481) +- Added `"message"` as option for `check_type` argument in `derive_var_obs_number()` function. (#2481) + +- Added `"message"` as option for `check_type` argument in `filter_extreme()` function. (#2481) - Users can now specify how duplicate records are handled in `derive_param_tte()` using the `check_type` argument, with options including `"error"`, `"warning"`, `"message"`, or `"none"`, allowing for greater flexibility in managing duplicate data scenarios. (#2481) -- `order` argument has been added to `event_source()` and `censor_source()` and +- The `order` argument has been added to `event_source()` and `censor_source()` and defaulted to `NULL` to allow specifying variables in addition to the date variable. This can be used to ensure the uniqueness of the select records if there is more than one record per date. (#2481) - NCICTCAEv5 grading criteria (`atoxgr_criteria_ctcv5`): @@ -47,12 +44,10 @@ or that the queries dataset contains duplicates. (#2543) - `derive_vars_atc()` and `create_single_dose_dataset()` `by_vars` argument updated to use `get_admiral_option("subject_keys")` instead of `USUBJID` or `STUDYID` in `bds_exposure.Rmd`. (#2501) -- test scripts, R, and markdown files for `create_single_dose_dataset` and `occds.Rmd` updated to include a `STUDYID` column because of `get_admiral_option("subject_keys")` update above. (#2501) +- The test scripts, R, and markdown files for `create_single_dose_dataset()` and `occds.Rmd` updated to include a `STUDYID` column because of `get_admiral_option("subject_keys")` update above. (#2501) - Update `derive_vars_period()` to make it work when there is only one new variable. (#2582) -- In `get_summary_records()`, previously deprecated formal arguments `analysis_var` and `summary_fun` now removed from function, documentation, tests etc. (#2521) - - A check was added to `derive_vars_transposed()` and `derive_vars_atc()` which stops execution if the records in `dataset_merge` or `dataset_facm` respectively are not unique. (#2563) @@ -103,6 +98,8 @@ default. To enable it the new admiral option `save_memory` has to be set to - `derive_var_joined_exist_flag(first_cond, filter)` - `event_joined(first_cond)` - `filter_joined(first_cond, filter)` + - In `get_summary_records()`, previously deprecated formal arguments `analysis_var` and + `summary_fun` now removed from function, documentation, tests etc. (#2521) ## Documentation @@ -118,6 +115,10 @@ one in `censor_conditions`). (#2639) ## Various +- Replace use of `data("sdtm")` with `sdtm <- pharmaverse::sdtm` in templates and vignettes. (#2498) +- Remove `dthcaus_source()` calls in `ADSL` template because they are deprecated. (#2517) +- Update `ADEG` template to flag `ABLFL` and `ANL01FL` based on `DTYPE == "AVERAGE"` records. (#2561) +
Developer Notes diff --git a/R/data.R b/R/data.R index 4311ff9995..25884ef310 100644 --- a/R/data.R +++ b/R/data.R @@ -4,7 +4,7 @@ #' @keywords datasets #' @family datasets #' @source -#' Derived from the `ex` dataset using `{admiral}` and `{dplyr}` (\url{https://github.com/pharmaverse/admiral/blob/main/inst/example_scripts/derive_single_dose.R}) +#' Derived from the `ex` dataset using `{admiral}` and `{dplyr}` (\url{https://github.com/pharmaverse/admiral/blob/main/data-raw/create_ex_single.R}) "ex_single" #' Example `QS` Dataset @@ -17,7 +17,7 @@ #' @keywords datasets #' @family datasets #' @source -#' Created by (\url{https://github.com/pharmaverse/admiral/blob/main/inst/example_scripts/example_qs.R}) +#' Created by (\url{https://github.com/pharmaverse/admiral/blob/main/data-raw/create_example_qs.R}) "example_qs" #' Queries Dataset diff --git a/README.md b/README.md index b93ddaa24b..d0debe4a92 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,7 @@ install.packages("admiral") To install the development version of the package from GitHub run: ```r -# install.packages("devtools") -devtools::install_github("pharmaverse/admiral") +pak::pkg_install("admiral", dependencies = TRUE) ``` ## Cheat Sheet @@ -41,18 +40,22 @@ The `{admiral}` family has several downstream and upstream dependencies and so r * Phase 1 release is for [{admiraldev}](https://pharmaverse.github.io/admiraldev/), [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/), and [{admiral}](https://pharmaverse.github.io/admiral/) core * Phase 2 release is extension packages, e.g. [{admiralonco}](https://pharmaverse.github.io/admiralonco/), [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/), [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/) and [{pharmaverseadam}](https://pharmaverse.github.io/pharmaverseadam/). -| Release Schedule | Phase 1- Date and Packages | Phase 2- Date and Packages | -| ---------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------- | -| | | | -| Q4-2024 | December 2nd | December 9th | -| | [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/) | -| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/) | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/) | -| | [{admiral}](https://pharmaverse.github.io/admiral/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/) | | | | [{pharmaverseadam}](https://pharmaverse.github.io/pharmaverseadam/) | -| | | | -| Q2-2025 | June 2nd | June 10th | -| | [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/) | -| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/) | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/) | -| | [{admiral}](https://pharmaverse.github.io/admiral/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/) | | | | [{pharmaverseadam}](https://pharmaverse.github.io/pharmaverseadam/) | +__NB:__ We strive for a regular 6 month release schedule. + +| Release Schedule | Phase 1- Date and Packages | Phase 2- Date and Packages | +| ---------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------ | +| | | | +| Q2-2025 | Mid-June | Mid-June | +| | [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/) | +| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/) | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/) | +| | [{admiral}](https://pharmaverse.github.io/admiral/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/) | +| | | [{pharmaverseadam}](https://pharmaverse.github.io/pharmaverseadam/)| +| | | | +| Q4-2025/Q1 2026 | Late December 2025/early January 2026 | Late December 2025/early January 2026 | +| | [{pharmaversesdtm}](https://pharmaverse.github.io/pharmaversesdtm/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/) | +| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/) | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/) | +| | [{admiral}](https://pharmaverse.github.io/admiral/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/) | +| | | [{pharmaverseadam}](https://pharmaverse.github.io/pharmaverseadam/)| ## Main Goal @@ -189,4 +192,4 @@ We use the following for support and communications between user and developer c Along with the authors and contributors, thanks to the following people for their work on the package: -Jaxon Abercrombie, Mahdi About, Teckla Akinyi, James Black, Claudia Carlucci, Asha Chakma, Bill Denney, Kamila Duniec, Alice Ehmann, Romain Francois, G Gayatri, Ania Golab, Alana Harris, Declan Hodges, Anthony Howard, Shimeng Huang, Samia Kabi, James Kim, John Kirkpatrick, Leena Khatri, Robin Koeger, Konstantina Koukourikou, Pavan Kumar, Pooja Kumari, Shan Lee, Wenyi Liu, Iain McCay, Jack McGavigan, Jordanna Morrish, Syed Mubasheer, Thomas Neitmann, Yohann Omnes, Barbara O'Reilly, Lina Patil, Hamza Rahal, Nick Ramirez, Tom Ratford, Jim Rothstein, Sukalpo Saha, Tamara Senior, Sophie Shapcott, Vladyslav Shuliar, Ondrej Slama, Andrew Smith, Daniil Stefonishin, Steven Ting, Vignesh Thanikachalam, Michael Thorpe, Annie Yang, Ojesh Upadhyay, Franciszek Walkowiak and Kangjie Zhang. +Anthony Arroyo, Jaxon Abercrombie, Mahdi About, Teckla Akinyi, James Black, Claudia Carlucci, Asha Chakma, Bill Denney, Kamila Duniec, Alice Ehmann, Romain Francois, G Gayatri, Ania Golab, Alana Harris, Declan Hodges, Anthony Howard, Shimeng Huang, Samia Kabi, James Kim, John Kirkpatrick, Leena Khatri, Robin Koeger, Konstantina Koukourikou, Pavan Kumar, Pooja Kumari, Shan Lee, Wenyi Liu, Iain McCay, Jack McGavigan, Jordanna Morrish, Syed Mubasheer, Thomas Neitmann, Yohann Omnes, Barbara O'Reilly, Lina Patil, Hamza Rahal, Nick Ramirez, Tom Ratford, Jim Rothstein, Sukalpo Saha, Tamara Senior, Sophie Shapcott, Vladyslav Shuliar, Ondrej Slama, Andrew Smith, Daniil Stefonishin, Steven Ting, Vignesh Thanikachalam, Michael Thorpe, Annie Yang, Ojesh Upadhyay, Franciszek Walkowiak and Kangjie Zhang. diff --git a/_pkgdown.yml b/_pkgdown.yml index 2f05c284b6..7f4a6a2463 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -141,13 +141,13 @@ reference: When a function is deprecated: - * In Year 1 there will be a message issued if you use the function/argument, but it will still be available to use. - * In Year 2 a warning will be produced if you use the function/argument, but it will still be available to use. + * In Year 1, there will be a message issued if you use the function/argument, but it will still be available to use. + * In Year 2, a warning will be produced if you use the function/argument, but it will still be available to use. * In Year 3, an error will be produced if you use the function/argument and no longer be able to use. * Finally, after 3 years, the function/argument and related documentation and tests will be removed from `{admiral}`. *Note: Guidance on replacement functionality will be found in the message produced as well as in the function's - documentation* + documentation.* Below, you can find a list of functions in the process of being deprecated: contents: diff --git a/inst/WORDLIST b/inst/WORDLIST index d084dceb99..b2fb4b1f65 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -255,6 +255,7 @@ Yohann Zhang admiralci admiraldev +admiraldiscovery admiralonco admiralophtha admiralvaccine @@ -308,7 +309,6 @@ mmHg mmol modularized msec -nd occds onwards parttime diff --git a/man/ex_single.Rd b/man/ex_single.Rd index 5bdcb56823..04c86f0629 100644 --- a/man/ex_single.Rd +++ b/man/ex_single.Rd @@ -8,7 +8,7 @@ An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 22439 rows and 17 columns. } \source{ -Derived from the \code{ex} dataset using \code{{admiral}} and \code{{dplyr}} (\url{https://github.com/pharmaverse/admiral/blob/main/inst/example_scripts/derive_single_dose.R}) +Derived from the \code{ex} dataset using \code{{admiral}} and \code{{dplyr}} (\url{https://github.com/pharmaverse/admiral/blob/main/data-raw/create_ex_single.R}) } \usage{ ex_single diff --git a/man/example_qs.Rd b/man/example_qs.Rd index 54845ed6e0..3ca8dd12c4 100644 --- a/man/example_qs.Rd +++ b/man/example_qs.Rd @@ -8,7 +8,7 @@ An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 161 rows and 11 columns. } \source{ -Created by (\url{https://github.com/pharmaverse/admiral/blob/main/inst/example_scripts/example_qs.R}) +Created by (\url{https://github.com/pharmaverse/admiral/blob/main/data-raw/create_example_qs.R}) } \usage{ example_qs diff --git a/vignettes/faq.Rmd b/vignettes/faq.Rmd index 724abe3101..4a94565838 100644 --- a/vignettes/faq.Rmd +++ b/vignettes/faq.Rmd @@ -50,7 +50,7 @@ knitr::opts_chunk$set( ##### Admiral offers a **toolbox of functions to facilitate ADaM**. What does that mean? * Functions are usually parameter driven: - * e.g. the `derive_vars_aage` has a parameterized start and end-date and a unit. + * e.g. the `derive_vars_aage()` has a parameterized start and end-date and a unit. * Depending on the parameters results may vary as does the specification. * Functions serve as a toolbox so the user can create their ADaM according to the requirements. * The principles, programming strategy and documentation of `{admiral}` are considered as a framework for users to contribute. @@ -65,6 +65,8 @@ knitr::opts_chunk$set( * A [Cheat Sheet](https://github.com/pharmaverse/admiral/blob/main/inst/cheatsheet/admiral_cheatsheet.pdf) is available, providing some examples of the many `{admiral}` functions. * For more detailed description, please refer to the [Reference section](https://pharmaverse.github.io/admiral/reference/index.html). +* [admiraldiscovery](https://pharmaverse.github.io/admiraldiscovery/articles/reactable.html) provides +a way to look up common ADaM variables with recommended `{admiral}` functions to complete the derivation. ##### Would `{admiral}` **create a whole** ADaM dataset? diff --git a/vignettes/lab_grading.Rmd b/vignettes/lab_grading.Rmd index 34fbaec15c..7fa93e3296 100644 --- a/vignettes/lab_grading.Rmd +++ b/vignettes/lab_grading.Rmd @@ -482,12 +482,12 @@ atoxgr_criteria_ctcv4 %>% Grading is implemented for those lab tests where a lab value is included in the grading definition, `{admiral}` does NOT try to read any other data to determine the grade, and only the `ADLB` dataset is used. -The following CTCAE v5.0 SOC values were identified for grading, these are “Investigations", -“Metabolism and nutrition disorders” and “Blood and lymphatic system disorders”. +The following CTCAE v5.0 SOC values were identified for grading, these are "Investigations", +"Metabolism and nutrition disorders" and "Blood and lymphatic system disorders". From these SOC values the following terms criteria is implemented in `{admiral}` -From SOC = “Investigations" there are 21 CTCAE v5.0 Terms: +From SOC = "Investigations" there are 21 CTCAE v5.0 Terms: + Activated partial thromboplastin time prolonged + Alanine aminotransferase increased @@ -513,7 +513,7 @@ From SOC = “Investigations" there are 21 CTCAE v5.0 Terms: Note: These are the same terms identified for NCI-CTCAEv4. -From the SOC = “Metabolism and nutrition disorders” there are 12 CTCAE v4.0 Terms: +From the SOC = "Metabolism and nutrition disorders" there are 12 CTCAE v4.0 Terms: + Hypercalcemia + Hyperkalemia @@ -531,7 +531,7 @@ From the SOC = “Metabolism and nutrition disorders” there are 12 CTCAE v4.0 Note: These are the same terms identified for NCI-CTCAEv4, except "Hypophosphatemia" and "Hyperglycemia" which are not in NCICTCAEv5 grading criteria. -From the SOC = “Blood and lymphatic system disorders” there are 2 CTCAE v4.0 Terms: +From the SOC = "Blood and lymphatic system disorders" there are 2 CTCAE v4.0 Terms: + Anemia + Leukocytosis