Skip to content

Commit

Permalink
Closes #40 use pharmaversesdtm to host dm_peds and vs_peds (#84)
Browse files Browse the repository at this point in the history
* need staged dependencies to check everything still works

* demo pharmaversesdtm works, if properly installed

* check if this works

* needs to be in import

* can it be suggests?

* remove pharmaversesdtm:: reference

* can't be removed yet

* does this work?

* typo

* use :: convention

* only use :: formatting

* missed a spot

* missed one

* slight inconsistencies are fixed

* add news entry

* Update NEWS.md

Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com>

* fix error

---------

Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com>
  • Loading branch information
zdz2101 and rossfarrugia authored Oct 16, 2024
1 parent 6e3d9ca commit 627aaf7
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 407 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ Imports:
Suggests:
knitr,
lubridate (>= 1.7.4),
pharmaversesdtm (>= 0.2.0),
pharmaversesdtm,
rmarkdown,
stringr (>= 1.4.0),
testthat (>= 3.0.0),
tibble
Remotes: pharmaverse/pharmaversesdtm@admiralpeds_data_migration
VignetteBuilder:
knitr
Config/testthat/edition: 3
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
## Documentation

- Added CRAN installation instructions to README (#10).
- Subject based test data (e.g. DM, VS) has been migrated out of `{admiralpeds}` to `{pharmaversesdtm}` (#40)

## Various

Expand Down
14 changes: 0 additions & 14 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,6 @@
#' @source \url{https://www.cdc.gov/growthcharts/percentile_data_files.htm}
"cdc_bmiage"

#' Demographic Dataset-pediatrics
#'
#' An updated SDTM DM dataset with pediatric patients
#' @keywords datasets
#' @family datasets
"dm_peds"

#' Vital signs Dataset-pediatrics
#'
#' An updated SDTM VS dataset with anthropometric measurements for pediatric patients
#' @keywords datasets
#' @family datasets
"vs_peds"

#' Subject Level Analysis Dataset-pediatrics
#'
#' An updated ADaM ADSL dataset with pediatric patients
Expand Down
5 changes: 3 additions & 2 deletions R/derive_params_growth_age.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@
#' library(lubridate, warn.conflicts = FALSE)
#' 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)
Expand Down
7 changes: 4 additions & 3 deletions R/derive_params_growth_height.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@
#' library(lubridate, warn.conflicts = FALSE)
#' library(rlang, warn.conflicts = FALSE)
#' library(admiral, warn.conflicts = FALSE)
#' 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)
Expand All @@ -132,7 +133,7 @@
#' out_unit = "days"
#' )
#'
#' heights <- vs_peds %>%
#' heights <- pharmaversesdtm::vs_peds %>%
#' filter(VSTESTCD == "HEIGHT") %>%
#' select(USUBJID, VSSTRESN, VSSTRESU, VSDTC) %>%
#' rename(
Expand Down
4 changes: 2 additions & 2 deletions data-raw/adsl_peds.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ library(stringr)
# Create a basic ADSL for pediatrics ----

# Read in input data ----
data("dm_peds")
data("ex")
dm_peds <- pharmaversesdtm::dm_peds
ex <- pharmaversesdtm::ex

# Derivations ----

Expand Down
47 changes: 0 additions & 47 deletions data-raw/dm_peds.R

This file was deleted.

Loading

0 comments on commit 627aaf7

Please sign in to comment.