Skip to content

Commit

Permalink
Closes #2083 bug adpp and adpc still using admiraltest (#2086)
Browse files Browse the repository at this point in the history
* fix: #2083 using pharmaversesdtm

* fix: #2083 using pharmaversesdtm

* chore: #2083 renaming datasets

* chore: #2083 removing admiral prefix

* chore: #2083 removing admiral suffix

* chore: #2083 remove admiral suffix

* chore: remove admiral prefix
  • Loading branch information
bms63 authored Sep 5, 2023
1 parent ff6ee57 commit fd39698
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion inst/templates/ad_adex.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ library(stringr)
# as needed and assign to the variables below.
# The CDISC pilot datasets are used for demonstration purpose.
data("admiral_adsl")
data("admiral_ex")
data("ex")

adsl <- admiral_adsl

Expand Down
6 changes: 3 additions & 3 deletions inst/templates/ad_adpp.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Input: pp, 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)
library(stringr)
Expand All @@ -19,15 +19,15 @@ library(stringr)
# For illustration purposes read in admiral test data

# Load PP and Adsl
data("admiral_pp")
data("pp")
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

pp <- convert_blanks_to_na(admiral_pp)
pp <- convert_blanks_to_na(pp)

# Lookup tables ----
param_lookup <- tibble::tribble(
Expand Down
30 changes: 9 additions & 21 deletions inst/templates/ad_adppk.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ library(admiral)
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 @@ -19,10 +18,10 @@ library(admiral.test) # Contains example datasets from the CDISC pilot project o
# For illustration purposes read in admiral test data

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

data("admiral_adsl")

Expand All @@ -33,21 +32,10 @@ adsl <- admiral_adsl
# 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

# Load EX

ex <- convert_blanks_to_na(admiral_ex)

# Load PC

pc <- convert_blanks_to_na(admiral_pc)

# Load VS for baseline height and weight

vs <- convert_blanks_to_na(admiral_vs)

# Load LB for baseline lab values

lb <- convert_blanks_to_na(admiral_lb)
ex <- convert_blanks_to_na(ex)
pc <- convert_blanks_to_na(pc)
vs <- convert_blanks_to_na(vs)
lb <- convert_blanks_to_na(lb)

# ---- Lookup tables ----
param_lookup <- tibble::tribble(
Expand Down

0 comments on commit fd39698

Please sign in to comment.