Skip to contents

Get the Value of an Admiral Option Which Can Be Modified for Advanced Users.

Usage

get_admiral_option(option)

Arguments

option

A character scalar of commonly used admiral function inputs.

As of now, support only available for "subject_keys" or "force_admiral_vars". See set_admiral_options() for a description of the options.

Value

The value of the specified option.

Details

This function allows flexibility for function inputs that may need to be repeated multiple times in a script, such as subject_keys.

Examples

library(admiral.test)
library(dplyr, warn.conflicts = FALSE)
data("admiral_vs")
data("admiral_dm")

# Merging all dm variables to vs
derive_vars_merged(
  admiral_vs,
  dataset_add = select(admiral_dm, -DOMAIN),
  by_vars = get_admiral_option("subject_keys")
) %>%
  select(STUDYID, USUBJID, VSTESTCD, VISIT, VSTPT, VSSTRESN, AGE, AGEU)
#> # A tibble: 29,643 x 8
#>    STUDYID    USUBJID   VSTESTCD VISIT      VSTPT           VSSTRESN   AGE AGEU 
#>    <chr>      <chr>     <chr>    <chr>      <chr>              <dbl> <dbl> <chr>
#>  1 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER LYING DO…       64    63 YEARS
#>  2 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER STANDING…       83    63 YEARS
#>  3 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER STANDING…       57    63 YEARS
#>  4 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER LYING DO…       68    63 YEARS
#>  5 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER STANDING…       59    63 YEARS
#>  6 CDISCPILO… 01-701-1… DIABP    SCREENING… AFTER STANDING…       71    63 YEARS
#>  7 CDISCPILO… 01-701-1… DIABP    BASELINE   AFTER LYING DO…       56    63 YEARS
#>  8 CDISCPILO… 01-701-1… DIABP    BASELINE   AFTER STANDING…       51    63 YEARS
#>  9 CDISCPILO… 01-701-1… DIABP    BASELINE   AFTER STANDING…       61    63 YEARS
#> 10 CDISCPILO… 01-701-1… DIABP    AMBUL ECG… AFTER LYING DO…       67    63 YEARS
#> # … with 29,633 more rows