Skip to content

Commit 9375eee

Browse files
authored
Merge branch 'main' into patch-1
2 parents a55694d + ee8f651 commit 9375eee

File tree

27 files changed

+907
-27
lines changed

27 files changed

+907
-27
lines changed

.github/workflows/publish.yml

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
here
3737
reactable
3838
pharmaversesdtm
39+
metacore
40+
metatools
41+
xportr
42+
pharmaverseadam
3943
4044
4145
- name: Install tinytex

.lycheeignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ https://pharmaverse.github.io/blog/posts/2023-06-27_hackathon_app/
88
https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
99
https://go.appsilon.com/demo-apps
1010
https://doi.org/10.1177/17407745221123244
11+
https://appsilon.com/static/35215a117d1bc17fac2179f059c3709f/rhino_fda_pilot_r_shiny_app_e-ctd.webm

R/create_blogpost.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ c(
1515

1616
# Fill in the info, e.g.:
1717
create_post(
18-
post_name = "pharmaverse story", # needs to be character vector (length 1)
19-
post_date = "2023-08-30", # needs to be character vector (length 1)
18+
post_name = "admiral_1_0", # needs to be character vector (length 1)
19+
post_date = "2023-12-18", # needs to be character vector (length 1)
2020
description = "", # you can fill the description in later as well
21-
author = c("Nicholas Eugenio"), # one or more authors are permitted
22-
cover_image = "pharmaverse", # chose one of the above (see line 8)
23-
tags = c("community") # chose (multiple) from line 10
21+
author = c("Ben Straub"), # one or more authors are permitted
22+
cover_image = "new_features", # chose one of the above (see line 8)
23+
tags = c("admiral") # chose (multiple) from line 10
2424
)
2525

2626

_quarto.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ format:
3232
html:
3333
theme:
3434
light: [minty, ember.scss]
35+
dark: darkly
3536
#ember.scss
3637
css: styles.css
3738
# include-after-body: plausible.html

inst/WORDLIST.txt

+98
Original file line numberDiff line numberDiff line change
@@ -500,3 +500,101 @@ VSDY
500500
VSORRES
501501
VSSEQ
502502
VSTESTCD
503+
adnca
504+
adppk
505+
ADPPK
506+
AETHNIC
507+
AETHNICN
508+
ARMCD
509+
BILI
510+
BILIBL
511+
bmi
512+
BMIBL
513+
bsa
514+
BSABL
515+
CKD
516+
codelist
517+
COHORTC
518+
COUNTRYL
519+
COUNTRYN
520+
covar
521+
CRCL
522+
CRCLBL
523+
creat
524+
CREAT
525+
CREATBL
526+
creatu
527+
egfr
528+
EGFRBL
529+
EPI
530+
EXDOSFRM
531+
EXROUTE
532+
FORMN
533+
HTBL
534+
labsbl
535+
LBBLFL
536+
LBSTRESN
537+
LBTESTCD
538+
LBTESTCDB
539+
metatools
540+
Mosteller
541+
pc
542+
pharmacokinetic
543+
pharmaverseadam
544+
poppk
545+
preconfigured
546+
RACEN
547+
ROUTEN
548+
SEXN
549+
SITEIDN
550+
STUDYIDN
551+
SUBJID
552+
SUBJIDN
553+
SUBJTYP
554+
SUBJTYPC
555+
TBILBL
556+
USUBJIDN
557+
VSBLFL
558+
vslb
559+
VSSTRESN
560+
WTBL
561+
analytics
562+
Analytics
563+
csp
564+
dS
565+
eventID
566+
frontend
567+
nqJsLSLd
568+
pageID
569+
QHuA
570+
thome
571+
traceRedir
572+
pKobZqjlXChj
573+
si
574+
vehIoJgdA
575+
ABLFL
576+
admiraldisc
577+
admiraldiscovery
578+
advs
579+
AGEU
580+
AVALU
581+
bmi
582+
BMI
583+
BMIBL
584+
CANCTRFL
585+
changelog
586+
cheatsheet
587+
CMCAT
588+
CMSEQ
589+
codebase
590+
DTHFL
591+
ef
592+
EOSDT
593+
LSTALVDT
594+
msrc
595+
onboarding
596+
PRSEQ
597+
TRTEDT
598+
wayback
599+
ABLFL
600+
youtu

media/new_features.jpg

78.4 KB
Loading

posts/2023-06-27__hackathon_app/index.qmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ long_slug <- "2023-06-19_shiny_run_script"
2323

2424

2525
We recently created a shiny application for the [`admiral` hackathon](https://cosa.cdisc.org/events/Admiral) in February 2023.
26-
The [`admiral` hackathon](https://cosa.cdisc.org/events/Admiral) was an event designed to make statistical programmers from the pharmaceutical industry more comfortable with the [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) R package which allows users to efficiently transform data from one data standard (SDTM) to another (ADaM).
26+
The [`admiral` hackathon](https://cosa.cdisc.org/events/Admiral) was an event designed to make statistical programmers from the pharmaceutical industry more comfortable with the [`admiral`](https://pharmaverse.github.io/admiral/) R package which allows users to efficiently transform data from one data standard (SDTM) to another (ADaM).
2727

2828
Hackathon participants formed groups of up to five people and were then tasked to create R-scripts that map the SDTM data to ADaM according to specifics defined in the metadata.
2929

@@ -32,7 +32,7 @@ The purpose of the shiny app was threefold:
3232
1. Allow participants to easily register as a team.
3333

3434

35-
2. Let participants upload their R-scripts, so that the [`admiral` team](https://github.com/pharmaverse/admiral/graphs/contributors) can see how the [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) package is being used -- and how the functions and the documentation could be improved.
35+
2. Let participants upload their R-scripts, so that the [`admiral` team](https://github.com/pharmaverse/admiral/graphs/contributors) can see how the [`admiral`](https://pharmaverse.github.io/admiral/) package is being used -- and how the functions and the documentation could be improved.
3636

3737

3838
3. Run participants R-scripts on the cloud and compare the produced file to a solution file.

posts/2023-06-27_admiral/valuelevel/derive_param_computed.qmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ options(width = narrow)
2929

3030
When creating ADaM Basic Data Structure (BDS) datasets, we often encounter deriving a new parameter based on the analysis values (e.g., AVAL) of other parameters.
3131

32-
The [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) function [`derive_param_computed()`](https://pharmaverse.github.io/admiral/cran-release/reference/derive_param_computed.html) adds a parameter computed from the analysis value of other parameters.
32+
The [`admiral`](https://pharmaverse.github.io/admiral/) function [`derive_param_computed()`](https://pharmaverse.github.io/admiral/reference/derive_param_computed.html) adds a parameter computed from the analysis value of other parameters.
3333

3434
It works like a calculator to derive new records without worrying about merging and combining datasets, all you need is a derivation formula, which also improves the readability of the code.
3535

@@ -69,10 +69,10 @@ adex_admiral <- derive_param_computed(
6969
adex,
7070
by_vars = exprs(USUBJID),
7171
parameters = c("TOTDOSE", "NUMCYC"),
72-
analysis_value = AVAL.TOTDOSE / AVAL.NUMCYC,
7372
set_values_to = exprs(
7473
PARAMCD = "ADPCYMG",
75-
PARAM = "Actual Dose per Cycle (mg)"
74+
PARAM = "Actual Dose per Cycle (mg)",
75+
AVAL = AVAL.TOTDOSE / AVAL.NUMCYC
7676
)
7777
)
7878
```

posts/2023-07-10_blanks_and_nas/blanks_and_nas.qmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ to bring in your source data to construct your ADaMs or SDTMs.
2828

2929
Unfortunately, while using [haven](https://haven.tidyverse.org/) the character blanks (missing data) found in a typical SAS-based dataset are left as blanks. These blanks will typically prove problematic while using functions like `is.na` in combination with `dplyr::filter()` to subset data. Check out [Bayer's SAS2R catalog: handling-of-missing-values](https://bayer-group.github.io/sas2r/r-and-sas-syntax.html#handling-of-missing-values) for more discussion on missing values and `NAs`.
3030

31-
In the [admiral](https://pharmaverse.github.io/admiral/cran-release/) package, we have built a simple function called `convert_blanks_to_na()` to help us quickly remedy this problem. You can supply an entire dataframe to this function and it will convert any character blanks to `NA_character_`
31+
In the [admiral](https://pharmaverse.github.io/admiral/) package, we have built a simple function called `convert_blanks_to_na()` to help us quickly remedy this problem. You can supply an entire dataframe to this function and it will convert any character blanks to `NA_character_`
3232

3333
## Loading Packages and Making Dummy Data
3434

@@ -64,7 +64,7 @@ df_na %>% filter(is.na(RFICDTC))
6464

6565
## That's it!
6666

67-
A simple call to this function can make your derivation life so much easier while working in R if working with SAS-based datasets. In [admiral](https://pharmaverse.github.io/admiral/cran-release/), we make use of this function at the start of all ADaM templates for common ADaM datasets. You can use the function `use_ad_template()` to get the full R script for the below ADaMs.
67+
A simple call to this function can make your derivation life so much easier while working in R if working with SAS-based datasets. In [admiral](https://pharmaverse.github.io/admiral/), we make use of this function at the start of all ADaM templates for common ADaM datasets. You can use the function `use_ad_template()` to get the full R script for the below ADaMs.
6868

6969
```{r}
7070
list_all_templates()

posts/2023-07-14_code_sections/code_sections.qmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ long_slug <- "2023-07-14_code_sections"
2323

2424
## Introduction
2525

26-
The [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) package embraces a modular style of programming, where blocks of code are pieced together in sequence to create an ADaM dataset. However, with the well-documented advantages of the modular approach comes the recognition that scripts will on average be longer. As such, astute programmers working in RStudio are constantly on the lookout for quick ways to effectively navigate their scripts. Enter **code sections**!
26+
The [`admiral`](https://pharmaverse.github.io/admiral/) package embraces a modular style of programming, where blocks of code are pieced together in sequence to create an ADaM dataset. However, with the well-documented advantages of the modular approach comes the recognition that scripts will on average be longer. As such, astute programmers working in RStudio are constantly on the lookout for quick ways to effectively navigate their scripts. Enter **code sections**!
2727

2828
## So, what are code sections and why are they useful?
2929

@@ -73,7 +73,7 @@ For a complete list of Code Sections shortcuts, and for further information, see
7373

7474
# Code Sections on `admiral`
7575

76-
Within the [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) package, heavy use of code sections is made in scripts such as our template ADaM programs. This ensures that they are more traversable and also encourages good commenting practices throughout the program. Here is an example using the ADAE template program:
76+
Within the [`admiral`](https://pharmaverse.github.io/admiral/) package, heavy use of code sections is made in scripts such as our template ADaM programs. This ensures that they are more traversable and also encourages good commenting practices throughout the program. Here is an example using the ADAE template program:
7777

7878
```{r, eval = FALSE, message = FALSE}
7979
library(admiral)
@@ -87,7 +87,7 @@ knitr::include_graphics("adae_code_sections.png")
8787
```
8888

8989
## Conclusion
90-
Code sections are an easy way to navigate long scripts and foster good commenting practices. They are used extensively in the [`admiral`](https://pharmaverse.github.io/admiral/cran-release/) package, but there is no reason that you cannot start using them yourself in your day-to-day R programming!
90+
Code sections are an easy way to navigate long scripts and foster good commenting practices. They are used extensively in the [`admiral`](https://pharmaverse.github.io/admiral/) package, but there is no reason that you cannot start using them yourself in your day-to-day R programming!
9191

9292
<!--------------- appendices go here ----------------->
9393

posts/2023-08-08_study_day/study_day.qmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ long_slug <- "2023-08-08_study_day"
2121

2222
<!--------------- post begins here ----------------->
2323

24-
Creating `--DY` variables for your ADaMs is super easy using [`derive_vars_dy()`](https://pharmaverse.github.io/admiral/v0.11.1/reference/derive_vars_dy.html) from the [admiral package](https://pharmaverse.github.io/admiral/cran-release/).
24+
Creating `--DY` variables for your ADaMs is super easy using [`derive_vars_dy()`](https://pharmaverse.github.io/admiral/v0.11.1/reference/derive_vars_dy.html) from the [admiral package](https://pharmaverse.github.io/admiral/).
2525

2626

2727
Let's build some dummy data with 4 subjects, a start date/time for treatment (`TRTSDTM`), an analysis start date/time variable (`ASTDTM`) and an analysis end date variable (`AENDT`).
@@ -73,7 +73,7 @@ derive_vars_dy(
7373
```
7474

7575

76-
If you want to get `--DT` or `--DTM` variables using `admiral` then check out [`derive_vars_dt()`](https://pharmaverse.github.io/admiral/cran-release/reference/derive_vars_dt.html) and [`derive_vars_dtm()`](https://pharmaverse.github.io/admiral/cran-release/reference/derive_vars_dtm.html). If things are messy in your data, e.g. partial dates, both functions have great imputation abilities, which we will cover in an upcoming blog post!
76+
If you want to get `--DT` or `--DTM` variables using `admiral` then check out [`derive_vars_dt()`](https://pharmaverse.github.io/admiral/reference/derive_vars_dt.html) and [`derive_vars_dtm()`](https://pharmaverse.github.io/admiral/reference/derive_vars_dtm.html). If things are messy in your data, e.g. partial dates, both functions have great imputation abilities, which we will cover in an upcoming blog post!
7777

7878

7979
<!--------------- appendices go here ----------------->

posts/2023-09-26_date_functions_and_imputation/date_functions_and_imputation.qmd

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ In this article, we first examine the arsenal of functions provided by`{admiral}
3636
`{admiral}` provides the following functions for date/datetime imputation:
3737

3838
- Derivations for adding variables
39-
- [derive_vars_dt()](https://pharmaverse.github.io/admiral/cran-release/reference/derive_vars_dt.html): Adds a date variable and a date imputation flag variable (optional) based on a --DTC variable and imputation rules.
40-
- [derive_vars_dtm()](https://pharmaverse.github.io/admiral/cran-release/reference/derive_vars_dtm.html): Adds a datetime variable, a date imputation flag variable, and a time imputation flag variable (both optional) based on a --DTC variable and imputation rules.
39+
- [derive_vars_dt()](https://pharmaverse.github.io/admiral/reference/derive_vars_dt.html): Adds a date variable and a date imputation flag variable (optional) based on a --DTC variable and imputation rules.
40+
- [derive_vars_dtm()](https://pharmaverse.github.io/admiral/reference/derive_vars_dtm.html): Adds a datetime variable, a date imputation flag variable, and a time imputation flag variable (both optional) based on a --DTC variable and imputation rules.
4141
- Computation functions
42-
- [impute_dtc_dtm()](https://pharmaverse.github.io/admiral/cran-release/reference/impute_dtc_dtm.html): Returns a complete ISO 8601 datetime or `NA` based on a partial ISO 8601 datetime and imputation rules.
43-
- [impute_dtc_dt()](https://pharmaverse.github.io/admiral/cran-release/reference/impute_dtc_dt.html): Returns a complete ISO 8601 date (without time) or `NA` based on a partial ISO 8601 date(time) and imputation rules.
44-
- [convert_dtc_to_dt()](https://pharmaverse.github.io/admiral/cran-release/reference/convert_dtc_to_dt.html): Returns a date if the input ISO 8601 date is complete. Otherwise, `NA` is returned.
45-
- [convert_dtc_to_dtm()](https://pharmaverse.github.io/admiral/cran-release/reference/convert_dtc_to_dtm.html): Returns a datetime if the input ISO 8601 date is complete (with missing time replaced by `"00:00:00"` as default). Otherwise, NA is returned.
46-
- [compute_dtf()](https://pharmaverse.github.io/admiral/cran-release/reference/compute_dtf.html): Returns the date imputation flag.
47-
- [compute_tmf()](https://pharmaverse.github.io/admiral/cran-release/reference/compute_tmf.html): Returns the time imputation flag.
42+
- [impute_dtc_dtm()](https://pharmaverse.github.io/admiral/reference/impute_dtc_dtm.html): Returns a complete ISO 8601 datetime or `NA` based on a partial ISO 8601 datetime and imputation rules.
43+
- [impute_dtc_dt()](https://pharmaverse.github.io/admiral/reference/impute_dtc_dt.html): Returns a complete ISO 8601 date (without time) or `NA` based on a partial ISO 8601 date(time) and imputation rules.
44+
- [convert_dtc_to_dt()](https://pharmaverse.github.io/admiral/reference/convert_dtc_to_dt.html): Returns a date if the input ISO 8601 date is complete. Otherwise, `NA` is returned.
45+
- [convert_dtc_to_dtm()](https://pharmaverse.github.io/admiral/reference/convert_dtc_to_dtm.html): Returns a datetime if the input ISO 8601 date is complete (with missing time replaced by `"00:00:00"` as default). Otherwise, NA is returned.
46+
- [compute_dtf()](https://pharmaverse.github.io/admiral/reference/compute_dtf.html): Returns the date imputation flag.
47+
- [compute_tmf()](https://pharmaverse.github.io/admiral/reference/compute_tmf.html): Returns the time imputation flag.
4848

4949
From the point of view of a typical ADaM programmer, the functions `impute_*`, `convert_*` and `compute_*` above can be viewed as utilities for treating dates and/or imputation within any custom code. In contrast, their `derive_*` find their use in directly deriving new timing variables and/or carrying out imputation at an ADaM dataset scale.
5050

51-
For a detailed look at the Imputation rules applied by these `{admiral}` functions, please visit [this vignette](https://pharmaverse.github.io/admiral/cran-release/articles/imputation.html#imputation-rules) on the documentation website.
51+
For a detailed look at the Imputation rules applied by these `{admiral}` functions, please visit [this vignette](https://pharmaverse.github.io/admiral/articles/imputation.html#imputation-rules) on the documentation website.
5252

5353
# Simple Examples with Vectors
5454

@@ -313,7 +313,7 @@ dataset_vignette(vs)
313313

314314
Deriving timing variables and carrying out imputations is tricky at the best of times, but hopefully this blog post can shed some light on how make this all easier using the `{admiral}` package! As `{admiral}` developers we are always interested in knowing how users are employing the package for their ADaM needs, so if you have any comments or feedback related to this topic, don't be afraid to leave a comment on our [Slack channel](https://app.slack.com/client/T028PB489D3/C02M8KN8269) or on the [Github repository](https://github.com/pharmaverse/admiral/), either as an issue or as a discussion.
315315

316-
For an even more detailed treatment of this topic, users are once again invited to read the corresponding [vignette](https://pharmaverse.github.io/admiral/cran-release/articles/imputation.html) on the documentation website, from which this article was adapted.
316+
For an even more detailed treatment of this topic, users are once again invited to read the corresponding [vignette](https://pharmaverse.github.io/admiral/articles/imputation.html) on the documentation website, from which this article was adapted.
317317

318318
<!--------------- appendices go here ----------------->
319319

0 commit comments

Comments
 (0)