From a456a5be02eee348ce303e400ec62992aa0516dd Mon Sep 17 00:00:00 2001 From: Zelos Zhu Date: Tue, 10 Sep 2024 15:39:34 +0000 Subject: [PATCH] use :: convention --- R/derive_params_growth_age.R | 4 ++-- R/derive_params_growth_height.R | 6 +++--- data-raw/adsl_peds.R | 2 +- inst/templates/ad_advs.R | 4 ++-- man/derive_params_growth_age.Rd | 4 ++-- man/derive_params_growth_height.Rd | 6 +++--- vignettes/advs.Rmd | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/R/derive_params_growth_age.R b/R/derive_params_growth_age.R index 73174fa..c56b9b0 100644 --- a/R/derive_params_growth_age.R +++ b/R/derive_params_growth_age.R @@ -118,9 +118,9 @@ #' library(admiral, warn.conflicts = FALSE) #' library(pharmaversesdtm, warn.conflicts = FALSE) #' -#' advs <- dm_peds %>% +#' advs <- pharmaversesdtm::dm_peds %>% #' select(USUBJID, BRTHDTC, SEX) %>% -#' right_join(., vs_peds, by = "USUBJID") %>% +#' right_join(., pharmaversesdtm::vs_peds, by = "USUBJID") %>% #' mutate( #' VSDT = ymd(VSDTC), #' BRTHDT = ymd(BRTHDTC) diff --git a/R/derive_params_growth_height.R b/R/derive_params_growth_height.R index a937ee0..bf3f7c4 100644 --- a/R/derive_params_growth_height.R +++ b/R/derive_params_growth_height.R @@ -118,9 +118,9 @@ #' #' # derive weight for height/length only for those under 2 years old using WHO #' # weight for length reference file -#' advs <- dm_peds %>% +#' advs <- pharmaversesdtm::dm_peds %>% #' select(USUBJID, BRTHDTC, SEX) %>% -#' right_join(., vs_peds, by = "USUBJID") %>% +#' right_join(., pharmaversesdtm::vs_peds, by = "USUBJID") %>% #' mutate( #' VSDT = ymd(VSDTC), #' BRTHDT = ymd(BRTHDTC) @@ -133,7 +133,7 @@ #' out_unit = "days" #' ) #' -#' heights <- vs_peds %>% +#' heights <- pharmaverse::vs_peds %>% #' filter(VSTESTCD == "HEIGHT") %>% #' select(USUBJID, VSSTRESN, VSSTRESU, VSDTC) %>% #' rename( diff --git a/data-raw/adsl_peds.R b/data-raw/adsl_peds.R index 8887a54..7300b74 100644 --- a/data-raw/adsl_peds.R +++ b/data-raw/adsl_peds.R @@ -11,7 +11,7 @@ library(stringr) # Create a basic ADSL for pediatrics ---- # Read in input data ---- -dm_peds <- dm_peds +dm_peds <- pharmaversesdtm::dm_peds ex <- ex # Derivations ---- diff --git a/inst/templates/ad_advs.R b/inst/templates/ad_advs.R index cf34f31..17a2d45 100644 --- a/inst/templates/ad_advs.R +++ b/inst/templates/ad_advs.R @@ -181,8 +181,8 @@ who_wt_for_lgth <- who_wt_for_lgth_boys %>% # as needed and assign to the variables below. # For illustration purposes read in admiral test data -vs_peds <- vs_peds -data("adsl_peds") +vs_peds <- pharmaversesdtm::vs_peds +adsl_peds <- admiralpeds::adsl_peds vs <- vs_peds adsl <- adsl_peds %>% select(-DOMAIN) diff --git a/man/derive_params_growth_age.Rd b/man/derive_params_growth_age.Rd index 21544d0..b6a21e6 100644 --- a/man/derive_params_growth_age.Rd +++ b/man/derive_params_growth_age.Rd @@ -132,9 +132,9 @@ library(rlang, warn.conflicts = FALSE) library(admiral, warn.conflicts = FALSE) library(pharmaversesdtm, warn.conflicts = FALSE) -advs <- dm_peds \%>\% +advs <- pharmaversesdtm::dm_peds \%>\% select(USUBJID, BRTHDTC, SEX) \%>\% - right_join(., vs_peds, by = "USUBJID") \%>\% + right_join(., pharmaversesdtm::vs_peds, by = "USUBJID") \%>\% mutate( VSDT = ymd(VSDTC), BRTHDT = ymd(BRTHDTC) diff --git a/man/derive_params_growth_height.Rd b/man/derive_params_growth_height.Rd index d383bd6..d66471c 100644 --- a/man/derive_params_growth_height.Rd +++ b/man/derive_params_growth_height.Rd @@ -131,9 +131,9 @@ library(pharmaversesdtm, warn.conflicts = FALSE) # derive weight for height/length only for those under 2 years old using WHO # weight for length reference file -advs <- dm_peds \%>\% +advs <- pharmaversesdtm::dm_peds \%>\% select(USUBJID, BRTHDTC, SEX) \%>\% - right_join(., vs_peds, by = "USUBJID") \%>\% + right_join(., pharmaversesdtm::vs_peds, by = "USUBJID") \%>\% mutate( VSDT = ymd(VSDTC), BRTHDT = ymd(BRTHDTC) @@ -146,7 +146,7 @@ advs <- dm_peds \%>\% out_unit = "days" ) -heights <- vs_peds \%>\% +heights <- pharmaverse::vs_peds \%>\% filter(VSTESTCD == "HEIGHT") \%>\% select(USUBJID, VSSTRESN, VSSTRESU, VSDTC) \%>\% rename( diff --git a/vignettes/advs.Rmd b/vignettes/advs.Rmd index a748e30..9f8bbeb 100644 --- a/vignettes/advs.Rmd +++ b/vignettes/advs.Rmd @@ -232,8 +232,8 @@ include the pediatrics-specific parameters as needed - for example: | BMIPCTL | BMI-for-age percentile | 10 | Subject Characteristic | 1 | ```{r echo=FALSE, message=FALSE} -vs_peds <- vs_peds -data("adsl_peds") +vs_peds <- pharmaversesdtm::vs_peds +adsl_peds <- admiralpeds::adsl_peds vs <- convert_blanks_to_na(vs_peds) adsl <- adsl_peds %>% select(-DOMAIN)