Skip to content

Commit

Permalink
Closes #2040 Update admiral.test to pharmaversesdtm (#2057)
Browse files Browse the repository at this point in the history
* Chore: #2040 Update admiral.test to pharmaversesdtm

* Chore: #2040 Update admiraltest to pharmaversesdtm: Update WORDLIST and run styler

* #2040 Update admiral.test to pharmaversesdtm: udpate staged_dependencies.yaml

* Chore: #2040 Update admiral.test to pharmaversesdtm: rename suppae and admiral_eg.

* Chore #2040 Update admiral.test to pharmaversesdtm: Update test-call_derivation.R

* Chore: #2040 Update admiral.test to pharmaversesdtm: Update create_query_data.R

* Chore: #2040 Update admiral.test to pharmaversesdtm run documentation for create_query_data

---------

Co-authored-by: Jeffrey Dickinson <[email protected]>
Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>
  • Loading branch information
4 people authored Aug 22, 2023
1 parent 50507c2 commit fb92c46
Show file tree
Hide file tree
Showing 29 changed files with 125 additions and 137 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Imports:
tidyr (>= 1.0.2),
tidyselect (>= 1.1.0)
Suggests:
admiral.test (>= 0.6.0),
pharmaversesdtm,
DT,
diffdf,
knitr,
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

- The function `derive_vars_dy()` is updated to avoid potential error when the input `dataset` with columns ending with `temp`. (#2012)

- Templates, vignettes, and other uses of `{admiral.test}` SDTM data are updated to use `{pharmaversesdtm}` instead. (#2040)


## Breaking Changes
- The following functions, which were deprecated in previous `{admiral}` versions, have been removed: (#1950)
Expand Down
14 changes: 7 additions & 7 deletions R/create_query_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
#' @examples
#' library(tibble)
#' library(dplyr, warn.conflicts = FALSE)
#' library(admiral.test)
#' library(pharmaversesdtm)
#' library(admiral)
#'
#' # creating a query dataset for a customized query
Expand Down Expand Up @@ -145,11 +145,11 @@
#' )
#' )
#'
#' # The get_terms function from admiral.test is used for this example.
#' # The get_terms function from pharmaversesdtm is used for this example.
#' # In a real application a company-specific function must be used.
#' create_query_data(
#' queries = list(pregsmq, bilismq),
#' get_terms_fun = admiral.test:::get_terms,
#' get_terms_fun = pharmaversesdtm:::get_terms,
#' version = "20.1"
#' )
#'
Expand All @@ -164,16 +164,16 @@
#' )
#' )
#'
#' # The get_terms function from admiral.test is used for this example.
#' # The get_terms function from pharmaversesdtm is used for this example.
#' # In a real application a company-specific function must be used.
#' create_query_data(
#' queries = list(sdg),
#' get_terms_fun = admiral.test:::get_terms,
#' get_terms_fun = pharmaversesdtm:::get_terms,
#' version = "2019-09"
#' )
#'
#' # creating a query dataset for a customized query including SMQs
#' # The get_terms function from admiral.test is used for this example.
#' # The get_terms function from pharmaversesdtm is used for this example.
#' # In a real application a company-specific function must be used.
#' create_query_data(
#' queries = list(
Expand All @@ -190,7 +190,7 @@
#' )
#' )
#' ),
#' get_terms_fun = admiral.test:::get_terms,
#' get_terms_fun = pharmaversesdtm:::get_terms,
#' version = "20.1"
#' )
create_query_data <- function(queries,
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}

remotes::install_github("pharmaverse/admiral.test") # This is a required dependency of {admiral}
remotes::install_github("pharmaverse/pharmaversesdtm") # This is a required dependency of {admiral}
remotes::install_github("pharmaverse/admiraldev") # This is a required dependency of {admiral}
remotes::install_github("pharmaverse/admiral")
```
Expand All @@ -37,19 +37,19 @@ remotes::install_github("pharmaverse/admiral")
The {admiral} family has several downstream and upstream dependencies and so this release shall be done in three
Phases:

* Phase 1 release is for [{admiraldev}](https://pharmaverse.github.io/admiraldev/main/), {admiral.test}, and [{admiral}](https://pharmaverse.github.io/admiral/cran-release/) core
* Phase 1 release is for [{admiraldev}](https://pharmaverse.github.io/admiraldev/main/), {pharmaversesdtm}, and [{admiral}](https://pharmaverse.github.io/admiral/cran-release/) core
* Phase 2 release is extension packages, e.g. [{admiralonco}](https://pharmaverse.github.io/admiralonco/main/), [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/), [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/main/)


|Release Schedule | Phase 1- Date and Packages | Phase 2- Date and Packages |
|---------------- | -------------------------- | -------------------------- |
| Q3-2023 | September 4th | September 11th |
| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/main/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/main/) |
| | {admiral.test} | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/) |
| | {pharmaversesdtm} | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/) |
| | [{admiral}](https://pharmaverse.github.io/admiral/main/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/main/) |
| Q4-2023 | December 4th | December 11th |
| | [{admiraldev}](https://pharmaverse.github.io/admiraldev/main/) | [{admiralonco}](https://pharmaverse.github.io/admiralonco/main/) |
| | {admiral.test} | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/) |
| | {pharmaversesdtm} | [{admiralophtha}](https://pharmaverse.github.io/admiralophtha/main/) |
| | [{admiral}](https://pharmaverse.github.io/admiral/main/) | [{admiralvaccine}](https://pharmaverse.github.io/admiralvaccine/main/) |

## Main Goal
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ occds
onwards
parttime
pharmaverse
pharmaversesdtm
phosphatase
poppk
pre
Expand Down
6 changes: 2 additions & 4 deletions inst/example_scripts/derive_single_dose.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

library(admiral.test)
library(pharmaversesdtm)
library(admiral)
library(dplyr)
data(admiral_ex)
ex <- admiral_ex
data(ex)

# check that there is only one start/end date of exposure per subject and visit
check_cond <- ex %>%
Expand Down
7 changes: 3 additions & 4 deletions inst/templates/ad_adae.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: ae, adsl, ex_single
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)

Expand All @@ -14,13 +14,12 @@ library(lubridate)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("admiral_ae")
data("ae")
data("admiral_adsl")
data("ex_single")
data("suppae")

adsl <- admiral_adsl
ae <- admiral_ae
suppae <- admiral_suppae

# When SAS datasets are imported into R using haven::read_sas(), missing
# character values from SAS appear as "" characters in R, instead of appearing
Expand Down
5 changes: 2 additions & 3 deletions inst/templates/ad_adcm.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: cm, adsl
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)

Expand All @@ -14,11 +14,10 @@ library(lubridate)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("admiral_cm")
data("cm")
data("admiral_adsl")

adsl <- admiral_adsl
cm <- admiral_cm

# When SAS datasets are imported into R using haven::read_sas(), missing
# character values from SAS appear as "" characters in R, instead of appearing
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/ad_adeg.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Input: adsl, eg
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
library(stringr)
Expand Down
3 changes: 1 addition & 2 deletions inst/templates/ad_adex.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#

library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
library(stringr)
Expand All @@ -19,7 +19,6 @@ data("admiral_adsl")
data("admiral_ex")

adsl <- admiral_adsl
ex <- admiral_ex

# When SAS datasets are imported into R using haven::read_sas(), missing
# character values from SAS appear as "" characters in R, instead of appearing
Expand Down
5 changes: 2 additions & 3 deletions inst/templates/ad_adlb.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: adsl, lb
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
library(stringr)
Expand All @@ -15,10 +15,9 @@ library(stringr)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("admiral_lb")
data("lb")
data("admiral_adsl")

lb <- admiral_lb
adsl <- admiral_adsl

# When SAS datasets are imported into R using haven::read_sas(), missing
Expand Down
1 change: 0 additions & 1 deletion inst/templates/ad_adlbhy.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#
# Input: adlb
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)

Expand Down
5 changes: 2 additions & 3 deletions inst/templates/ad_admh.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: mh, adsl
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)

Expand All @@ -13,12 +13,11 @@ library(lubridate)
# Use e.g. haven::read_sas to read in .sas7bdat, or other suitable functions
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data
data("admiral_mh")
data("mh")
data("admiral_adsl")
data("queries_mh")

adsl <- admiral_adsl
mh <- admiral_mh

mh <- convert_blanks_to_na(mh)

Expand Down
14 changes: 7 additions & 7 deletions inst/templates/ad_adpc.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ library(dplyr)
library(lubridate)
library(stringr)

library(admiral.test) # Contains example datasets from the CDISC pilot project or simulated
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project or simulated

# ---- Load source datasets ----

Expand All @@ -21,9 +21,9 @@ library(admiral.test) # Contains example datasets from the CDISC pilot project o


# Load PC, EX, VS and ADSL
data("admiral_pc")
data("admiral_ex")
data("admiral_vs")
data("pc")
data("ex")
data("vs")

data("admiral_adsl")

Expand All @@ -36,15 +36,15 @@ adsl <- admiral_adsl

# Load EX

ex <- convert_blanks_to_na(admiral_ex)
ex <- convert_blanks_to_na(ex)

# Load PC

pc <- convert_blanks_to_na(admiral_pc)
pc <- convert_blanks_to_na(pc)

# Load VS for baseline height and weight

vs <- convert_blanks_to_na(admiral_vs)
vs <- convert_blanks_to_na(vs)

# ---- Lookup tables ----
param_lookup <- tibble::tribble(
Expand Down
18 changes: 6 additions & 12 deletions inst/templates/ad_adsl.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: dm, ex, ds
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
library(stringr)
Expand All @@ -15,17 +15,11 @@ library(stringr)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("admiral_dm")
data("admiral_ds")
data("admiral_ex")
data("admiral_ae")
data("admiral_lb")

dm <- admiral_dm
ds <- admiral_ds
ex <- admiral_ex
ae <- admiral_ae
lb <- admiral_lb
data("dm")
data("ds")
data("ex")
data("ae")
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
Expand Down
5 changes: 2 additions & 3 deletions inst/templates/ad_advs.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Input: adsl, vs
library(admiral)
library(admiral.test) # Contains example datasets from the CDISC pilot project
library(pharmaversesdtm) # Contains example datasets from the CDISC pilot project
library(dplyr)
library(lubridate)
library(stringr)
Expand All @@ -15,11 +15,10 @@ library(stringr)
# as needed and assign to the variables below.
# For illustration purposes read in admiral test data

data("admiral_vs")
data("vs")
data("admiral_adsl")

adsl <- admiral_adsl
vs <- admiral_vs

# When SAS datasets are imported into R using haven::read_sas(), missing
# character values from SAS appear as "" characters in R, instead of appearing
Expand Down
14 changes: 7 additions & 7 deletions man/create_query_data.Rd

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

Loading

0 comments on commit fb92c46

Please sign in to comment.