Site icon R-bloggers

admiral 1.3.0: documentation go!!

[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.
< !--------------- typical setup -----------------> < !--------------- post begins here ----------------->

The second half of 2025 brings us once again to an exciting < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} release! Read through this blog post to learn more what is available in < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} 1.3.

< section id="headline-update-documentation-that-gets-you" class="level2">

Headline update: documentation that gets you

Our crowning update this release cycle is…

Documentation updates!

Hmmm, doesn’t sound fancy enough? What about…

Documentation updates!!

Still not that interesting? Well, let us change your mind with an example. Here’s what the examples section of the reference page for < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>Add the First or Last Observation for Each By Group as New Records — derive_extreme_records • admiral admiral::derive_extreme_records() looked like in < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} 1.2:

And here’s what it looks like in < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} 1.3:

That’s right! Some of our reference examples have now been enhanced such that:

As usual, you can access these reference examples from our documentation website or alternatively directly from RStudio’s own Help pane by typing ?function_name in the console.

For this first iteration, we have targeted some of the most complex, flexible and important functions within < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} . The functions which have received this enhanced example treatment are:

This is not to say that the other functions do not have examples anymore; rather, they retain the previous material.

Now, our aim as a development team is to continually enhance the reference examples of our large portfolio of functions regularly across release cycles. If you’d like to play a part, this is also a great opportunity to contribute to < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} yourself – please get in touch with our development team through Slack or our Github repo and we’d be happy to help you get started.

We’ve also made various other small documentation enhancements, which you can peruse in the Changelog.

< section id="new-function" class="level2">

New Function

But we haven’t stopped there! Here’s what else is new in < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} 1.3:

library(tibble)
library(dplyr, warn.conflicts = FALSE)
library(admiral)

adex <- tribble(
  ~USUBJID, ~ADY, ~AVAL,
  "1",         1,    10,
  "1",         8,    20,
  "1",        15,    10,
  "2",         8,     5
)

adae <- tribble(
  ~USUBJID, ~ADY, ~AEDECOD,
  "1",         2, "Fatigue",
  "1",         9, "Influenza",
  "1",        15, "Theft",
  "1",        15, "Fatigue",
  "2",         4, "Parasomnia",
  "3",         2, "Truancy"
)

derive_vars_joined_summary(
  dataset = adae,
  dataset_add = adex,
  by_vars = exprs(USUBJID),
  filter_join = ADY.join <= ADY,
  join_type = "all",
  join_vars = exprs(ADY),
  new_vars = exprs(CUMDOSA = sum(AVAL, na.rm = TRUE))
)
# A tibble: 6 × 4
  USUBJID   ADY AEDECOD    CUMDOSA
  <chr>   <dbl> <chr>        <dbl>
1 1           2 Fatigue         10
2 1           9 Influenza       30
3 1          15 Theft           40
4 1          15 Fatigue         40
5 2           4 Parasomnia      NA
6 3           2 Truancy         NA
< section id="breaking-changes" class="level2">

Breaking Changes

Excluding deprecations, we have only two small breaking changes:

We’ve also started pre-alerting users of an upcoming breaking change to the default behavior of < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>Derive/Impute a Datetime from a Character Date — derive_vars_dtm • admiral admiral::derive_vars_dtm() in our next release (1.4.0), where we’ll switch the default value of ignore_seconds_flag from FALSE to TRUE. Ahead of this change, < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>Derive/Impute a Datetime from a Character Date — derive_vars_dtm • admiral admiral::derive_vars_dtm() now issues a helpful message informing users of the upcoming change, to allowing mitigation ahead of time.

< section id="updates-of-existing-functions-and-bug-fixes" class="level2">

Updates of existing functions and bug fixes

We’ve also been busy updating some of our existing functions in response to bug fixes and requests for enhancements. One particular update of note was to admiral::derive_locf_records, which now comes with two new arguments id_vars_ref and imputation. The id_vars_ref argument allows users to select the variables to group by in the reference dataset when determining which observations to add to the input dataset. The imputation argument lets users decide whether to update analysis_var when its value is NA (“update” and “update_add”), or to add a new observation instead (“add”).

You can find the full list of updates in the Changelog.

< section id="conclusion" class="level2">

Conclusion

We’ve been truly thrilled with the amount of user feedback and engagement with the package in the last six months, which is a big reason for the amount of content in this new release. As such, we’re super excited to finally make < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} 1.3 available to the pharmaverse community, and look forward to continuing to co-create < bslib-tooltip placement="auto" bsoptions="[]" data-require-bs-version="5" data-require-bs-caller="tooltip()"> < template>ADaM in R Asset Library • admiral {admiral} together!

< !--------------- appendices go here ----------------->
< section id="last-updated" class="level2 appendix">

Last updated

2025-06-26 12:13:57.464777

< section id="details" class="level2 appendix">

Details

Source, Session info

< section class="quarto-appendix-contents" id="quarto-reuse">

Reuse

CC BY 4.0
< section class="quarto-appendix-contents" id="quarto-citation">

Citation

BibTeX citation:
@online{straub2025,
  author = {Straub, Ben and Mancini, Edoardo},
  title = {Admiral 1.3.0: Documentation Go!!},
  date = {2025-06-26},
  url = {https://pharmaverse.github.io/blog/posts/2025-06-26_admiral_1.3.../admiral_1.3.0:_documentation_go!!.html},
  langid = {en}
}
For attribution, please cite this work as:
Straub, Ben, and Edoardo Mancini. 2025. “Admiral 1.3.0: Documentation Go!!” June 26, 2025. https://pharmaverse.github.io/blog/posts/2025-06-26_admiral_1.3…/admiral_1.3.0:_documentation_go!!.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.
Exit mobile version