Hello admiralmetabolic!

R-bloggers 2025-01-21

[This article was first published on pharmaverse blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Introduction

The ADaM in R Asset Library • admiral {admiral} team is celebrating the newest addition to the extension package family with the release of Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} 0.1! This new package focuses on the therapeutic areas of obesity and cardiovascular metabolism, and was born out of a collaboration between Novo Nordisk and Roche, as well as a number of independent contributors. Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} addresses a key unmet need in this area given the ever-increasing interest in obesity, diabetes and cardiovascular metabolism across the industry.

Package Contents

For this first 0.1 release, Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} focuses primarily on the obesity indication. The package offers:

New Functions

The first function, Adds a Parameter for Waist to Height Ratio — derive_param_waisthgt • admiralmetabolic admiralmetabolic::derive_param_waisthgt() , is a wrapper to Adds a Parameter Computed from the Analysis Value of Other Parameters — derive_param_computed • admiral admiral::derive_param_computed() and enables users to add derived waist to height ratio parameters to a vital signs ADVS ADaM using waist circumference and height records. Here is an example of the function in action:

library(tibble)library(admiral)library(admiralmetabolic)# Derive Waist to Height Ratio. In this example height is measured only once per subject.advs <- tribble(  ~USUBJID,      ~PARAMCD, ~PARAM,                     ~AVAL, ~AVALU, ~VISIT,  "01-101-1001", "HEIGHT", "Height (cm)",              147,   "cm",   "SCREENING",  "01-101-1001", "WSTCIR", "Waist Circumference (cm)", 110,   "cm",   "SCREENING",  "01-101-1001", "WSTCIR", "Waist Circumference (cm)", 108,   "cm",   "WEEK 2",  "01-101-1001", "WSTCIR", "Waist Circumference (cm)", 107,   "cm",   "WEEK 3",  "01-101-1002", "HEIGHT", "Height (cm)",              163,   "cm",   "SCREENING",  "01-101-1002", "WSTCIR", "Waist Circumference (cm)", 120,   "cm",   "SCREENING",  "01-101-1002", "WSTCIR", "Waist Circumference (cm)", 118,   "cm",   "WEEK 2",  "01-101-1002", "WSTCIR", "Waist Circumference (cm)", 117,   "cm",   "WEEK 3",)derive_param_waisthgt(  advs,  by_vars = exprs(USUBJID, VISIT),  wstcir_code = "WSTCIR",  height_code = "HEIGHT",  set_values_to = exprs(    PARAMCD = "WAISTHGT",    PARAM = "Waist to Height Ratio"  ),  constant_by_vars = exprs(USUBJID),  get_unit_expr = admiral::extract_unit(PARAM))
# A tibble: 14 × 6   USUBJID     PARAMCD  PARAM                       AVAL AVALU VISIT       <chr>       <chr>    <chr>                      <dbl> <chr> <chr>     1 01-101-1001 HEIGHT   Height (cm)              147     cm    SCREENING 2 01-101-1001 WSTCIR   Waist Circumference (cm) 110     cm    SCREENING 3 01-101-1001 WSTCIR   Waist Circumference (cm) 108     cm    WEEK 2    4 01-101-1001 WSTCIR   Waist Circumference (cm) 107     cm    WEEK 3    5 01-101-1002 HEIGHT   Height (cm)              163     cm    SCREENING 6 01-101-1002 WSTCIR   Waist Circumference (cm) 120     cm    SCREENING 7 01-101-1002 WSTCIR   Waist Circumference (cm) 118     cm    WEEK 2    8 01-101-1002 WSTCIR   Waist Circumference (cm) 117     cm    WEEK 3    9 01-101-1001 WAISTHGT Waist to Height Ratio      0.748 <NA>  SCREENING10 01-101-1001 WAISTHGT Waist to Height Ratio      0.735 <NA>  WEEK 2   11 01-101-1001 WAISTHGT Waist to Height Ratio      0.728 <NA>  WEEK 3   12 01-101-1002 WAISTHGT Waist to Height Ratio      0.736 <NA>  SCREENING13 01-101-1002 WAISTHGT Waist to Height Ratio      0.724 <NA>  WEEK 2   14 01-101-1002 WAISTHGT Waist to Height Ratio      0.718 <NA>  WEEK 3   

Note that this function has built-in support for:

  • Unit conversion in cases where units differ across the numerator and denominator (allowed units: m, mm, ft, in);
  • Single or multiple height measurement by modifying the argument constant_by_vars. Please visit the function’s reference page for more details.

Adds a Parameter for Waist to Hip Ratio — derive_param_waisthip • admiralmetabolic admiralmetabolic::derive_param_waisthip() is very similar: it is also a wrapper to Adds a Parameter Computed from the Analysis Value of Other Parameters — derive_param_computed • admiral admiral::derive_param_computed() , but this time enables users to add derived waist to hip ratio parameters using waist- and hip circumference. It boasts the same unit-flexibility as Adds a Parameter for Waist to Height Ratio — derive_param_waisthgt • admiralmetabolic admiralmetabolic::derive_param_waisthgt() - let’s look at that in action:

advs2 <- tribble(  ~USUBJID,      ~PARAMCD, ~PARAM,                     ~AVAL, ~AVALU, ~VISIT,  "01-101-1001", "HIPCIR", "Hip Circumference (cm)",   125,   "cm",   "SCREENING",  "01-101-1001", "HIPCIR", "Hip Circumference (cm)",   124,   "cm",   "WEEK 2",  "01-101-1001", "WSTCIR", "Waist Circumference (in)", 43.31, "in",   "SCREENING",  "01-101-1001", "WSTCIR", "Waist Circumference (in)", 42.52, "in",   "WEEK 2",  "01-101-1002", "HIPCIR", "Hip Circumference (cm)",   135,   "cm",   "SCREENING",  "01-101-1002", "HIPCIR", "Hip Circumference (cm)",   133,   "cm",   "WEEK 2",  "01-101-1002", "WSTCIR", "Waist Circumference (in)", 47.24, "in",   "SCREENING",  "01-101-1002", "WSTCIR", "Waist Circumference (in)", 46.46, "in",   "WEEK 2")derive_param_waisthip(  advs2,  by_vars = exprs(USUBJID, VISIT),  wstcir_code = "WSTCIR",  hipcir_code = "HIPCIR",  set_values_to = exprs(    PARAMCD = "WAISTHIP",    PARAM = "Waist to Hip Ratio"  ),  get_unit_expr = admiral::extract_unit(PARAM))
ℹ Unit conversion performed for "HIPCIR". Values converted from "cm" to "in".
# A tibble: 12 × 6   USUBJID     PARAMCD  PARAM                       AVAL AVALU VISIT       <chr>       <chr>    <chr>                      <dbl> <chr> <chr>     1 01-101-1001 HIPCIR   Hip Circumference (cm)   125     cm    SCREENING 2 01-101-1001 HIPCIR   Hip Circumference (cm)   124     cm    WEEK 2    3 01-101-1001 WSTCIR   Waist Circumference (in)  43.3   in    SCREENING 4 01-101-1001 WSTCIR   Waist Circumference (in)  42.5   in    WEEK 2    5 01-101-1002 HIPCIR   Hip Circumference (cm)   135     cm    SCREENING 6 01-101-1002 HIPCIR   Hip Circumference (cm)   133     cm    WEEK 2    7 01-101-1002 WSTCIR   Waist Circumference (in)  47.2   in    SCREENING 8 01-101-1002 WSTCIR   Waist Circumference (in)  46.5   in    WEEK 2    9 01-101-1001 WAISTHIP Waist to Hip Ratio         0.880 <NA>  SCREENING10 01-101-1001 WAISTHIP Waist to Hip Ratio         0.871 <NA>  WEEK 2   11 01-101-1002 WAISTHIP Waist to Hip Ratio         0.889 <NA>  SCREENING12 01-101-1002 WAISTHIP Waist to Hip Ratio         0.887 <NA>  WEEK 2   

Vignettes and Template

On the Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} package website, users will find the obesity ADVS vignette. This documentation page will guide users towards creating an obesity ADVS ADaM, touching upon how to use our two new functions Adds a Parameter for Waist to Height Ratio — derive_param_waisthgt • admiralmetabolic admiralmetabolic::derive_param_waisthgt() and Adds a Parameter for Waist to Hip Ratio — derive_param_waisthip • admiralmetabolic admiralmetabolic::derive_param_waisthip() as well as how to apply existing ADaM in R Asset Library • admiral {admiral} tools such as the brand-new (as of admiral 1.2) Derive Categorization Variables Like AVALCATy and AVALCAyN — derive_vars_cat • admiral admiral::derive_vars_cat() to create weight classes within the AVALCAT variable and Derive Criterion Flag Variables CRITy, CRITyFL, and CRITyFN — derive_vars_crit_flag • admiral admiral::derive_vars_crit_flag() to create criterion flag/variable pairs for endpoints such as a 5% reduction in weight at a certain visit.

Of course, this vignette is coupled with the obesity ADVS template program, which users can use as a starting point for their ADaM scripts. The template can also be loaded and saved directly from the R console by running:

admiral::use_ad_template("ADVS", package = "admiralmetabolic")

The Control of Eating Questionnaire (COEQ) is used in many obesity trials as an endpoint. As such, Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} also contains a vignette geared towards the creation of an ADaM dataset ADCOEQ for the COEQ. Due to the flexibility of the parent ADaM in R Asset Library • admiral {admiral} package, functions such as Add New Records Within By Groups Using Aggregation Functions — derive_summary_records • admiral admiral::derive_summary_records() can be employed to create ADCOEQ. Users are invited to visit the vignette for more details and a full walkthrough.

Once again, this vignette comes hand-in-hand with the ADCOEQ program, which can be accessed through the link above or directly from the R console by running:

admiral::use_ad_template("ADCOEQ", package = "admiralmetabolic")

Conclusion

We love growing the ADaM in R Asset Library • admiral {admiral} family, and hope you are just as excited about Metabolism Extension Package for ADaM in R Asset Library • admiralmetabolic {admiralmetabolic} as we are. We welcome community feedback about the package, its content and development directions for future releases. Please raise your feedback as issues or discussions in our GitHub repository or the pharmaverse slack. The development team will be meeting next month for a retrospective and a plan for the next release, so please reach out!

Finally, if you have any suggestions for new extension packages, or would like to drive one yourself, please reach out to the ADaM in R Asset Library • admiral {admiral} Business Lead, Edoardo Mancini and/or the Technical Lead, Ben Straub through the pharmaverse slack and we’d be happy to discuss next steps with you.

Last updated

2025-01-21 14:38:35.140162

Details

Reuse

Citation

BibTeX citation:
@online{askeland2025,  author = {Askeland, Anders and Mancini, Edoardo},  title = {Hello Admiralmetabolic!},  date = {2025-01-21},  url = {https://pharmaverse.github.io/blog/posts/2025-01-21_hello_admiralmetabolic/hello_admiralmetabolic.html},  langid = {en}}
For attribution, please cite this work as:
Askeland, Anders, and Edoardo Mancini. 2025. “HelloAdmiralmetabolic!” January 21, 2025. https://pharmaverse.github.io/blog/posts/2025-01-21_hello_admiralmetabolic/hello_admiralmetabolic.html.
To leave a comment for the author, please follow the link and comment on their blog: pharmaverse blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Continue reading: Hello admiralmetabolic!