Skip to content

Releases: pharmaverse/admiral

v1.4.1

03 Feb 10:27
1ff21d3

Choose a tag to compare

admiral 1.4.1

Updates of Existing Functions

  • Grading metadata amended to ensure the criteria is exactly the same across SI and CV units
    when the UNIT_CHECK is identical or missing for a particular TERM. This allows grading metadata
    to be combined across SI and CV units. Also, comment added about "Creatinine Clearance" and lab
    values less than 10 for NCICTCAEv6. DAIDs grading metadata updated to use ADLB.ADT instead of
    ADLB.LBDT (#2958).

Documentation

  • Lab Grading vignette updated to add more clarity for "Creatinine Increased" and baseline visits. (#2958)

  • Fix typo in compute_bsa() in ADPPK template and vignette. (#2963)

v1.4.0

15 Jan 12:59
5bb3d39

Choose a tag to compare

admiral 1.4.0

New Features

  • New vignette "Explore ADaM Templates" added under the "Get Started" section to allow users to peruse the {admiral}
    ADaM templates directly from the documentation website. (#2935)

  • Updated PK programming vignette to use new experimental functions for deriving NFRLT (#2927).

  • Added experimental function derive_var_nfrlt() to derive NFRLT from timepoint
    and visit (e.g. VISITDY and PCTPT). (#2929)

  • Updated PK programming vignette to use new experimental functions for deriving
    NFRLT. (#2927)

  • Added experimental function convert_xxtpt_to_hours() to parse timepoint values
    (e.g. PCTPT, EGTPT, VSTPT) into hours. (#2916)

  • New experimental ADAB template script available ad_adab.R which creates Anti-drug
    Antibody Analysis Dataset. (#2805)

  • Lab grading metadata for NCI-CTCAE version 6.0 is now available for both SI and US (Conventional) units
    via atoxgr_criteria_ctcv6 and atoxgr_criteria_ctcv6_uscv. This includes grading criteria for Creatinine
    Clearance decreased. (#1858)

  • Lab grading metadata is now maintained in JSON format for all supported criteria (NCI-CTCAEv4, NCI-CTCAEv5,
    NCI-CTCAEv6, and DAIDS) in both SI and US conventional unit systems, improving maintainability and readability. (#1858)

Updates of Existing Functions

  • The functions derive_param_bmi(), derive_param_bsa(),
    derive_param_framingham(), derive_param_map(), and derive_param_qtc() were
    updated such that they no longer fail if {admiral} is not loaded. (#2667)

  • slice_derivation() was updated such that it no longer fails if args = NULL
    is specified. (#2875)

  • derive_summary_records() now issues an error if a non summary function is
    used in set_values_to which results in multiple records per by group. (#2872)

  • derive_summary_records() was updated to allow constants to be provided under the
    constant_values argument, which will be present in both summary and missing rows. (#2668)

Breaking Changes

  • In derive_var_atoxgr_dir(), the abnormal_indicator argument is deprecated and replaced with low_indicator
    and high_indicator arguments. This change enables independent control of baseline range indicators for low and
    high abnormalities, which is required for NCI-CTCAE version 6.0 criteria. The deprecated argument will continue
    to work with a deprecation message until the beginning of 2027. (#1858)

  • The default value of ignore_seconds_flag is set to TRUE. (#2798)

  • derive_var_merged_summary() is deprecated and will be replaced by derive_vars_merged_summary().
    This is just a rename of the function to align with our programming conventions, i.e.
    functions that can derive multiple variables have _vars_ in the name rather than
    _var_. (#2874)

  • The following function arguments are entering the next phase of the deprecation process:

    Phase 1 (message)

    • derive_var_atoxgr_dir(abnormal_indicator = ) is deprecated and replaced by the new low_indicator and
      high_indicator arguments for enhanced flexibility in lab grading. (#1858)
    • derive_var_merged_summary() is deprecated and will be replaced by derive_vars_merged_summary(). (#2874)

    Phase 2 (warning)

    • call_user_fun() is deprecated and will have no replacement. (#2678)
    • derive_param_extreme_record() is deprecated and replaced by derive_extreme_event().
    • derive_var_dthcaus() is deprecated and replaced by derive_vars_extreme_event().
    • date_source() is deprecated and replaced by event().
    • dthcaus_source() is deprecated and replaced by event().
    • derive_var_extreme_dt() and derive_var_extreme_dtm() are deprecated and replaced by
      derive_vars_extreme_event().
    • get_summary_records() is deprecated. Please use derive_summary_records() with the dataset_add
      argument and without the dataset argument.

    Phase 3 (error)

    No functions or arguments in this Phase

    Phase 4 (removed)

    No functions or arguments in this Phase

Documentation

  • New experimental vignette "Creating an ADAB ADaM", which describes how to create
    an anti-drug antibody analysis dataset. (#2873)

  • The lab grading vignette has been updated with examples for NCI-CTCAE version 6.0 criteria, including
    usage of the new low_indicator and high_indicator arguments. (#1858)

  • The "Ask AI" widget was added to the bottom right of each page. It enables users to ask questions about {admiral} and {admiraldev}
    and receive answers from an LLM. It is trained on the documentation of both packages and provided by
    kapa.ai. (#2887)

  • The BDS Findings vignette was updated to move derivation of ASEQ after any new rows. (#2780)

  • ADLBHY template was updated to keep PARAM in final dataset. (#2804)

  • A link to the {admiral} ecosystem page was added to the README sidebar and main text. (#2881)

  • The ADSL template and vignette were updated to add derivation of analysis age (AAGE/AAGEU) using derive_vars_aage(). This includes deriving birth date (BRTHDT) from birth date character variable (BRTHDTC) using derive_vars_dt(). (#2584)

  • Standardized variable notation across documentation to use -- for SDTM variables (e.g., --DTC) and * for ADaM variables (e.g., *DTM, *DT). (#2757)

  • For derive_vars_dt(), clarify highest_imputation definitions and expand date examples. (#2841)

  • The documentation was enhanced: (#2585)

    • For derive_locf_records(), each example now has a title (which is also shown in the TOC) and a description, improving readability. (#2889)
    • For derive_vars_cat(), each example now has a title (which is also shown in the TOC) and a description, improving readability. (#2701)

Various

Developer Notes - Updated the `{lintr}` preferences to use the shared `{admiraldev}` configurations. (#2863) and (#2913) - To reduce the size of the package: (#2944) - The compression method in `data-raw/adlb_grading/atoxgr_sources.R` was updated to `"bzip2"` everywhere. - The `admiral_adlb` dataset was updated so that it only contains the `"AST"`, `"ALT"` and `"BILI"` parameters.

admiral 1.3.1

04 Aug 21:04
e001b75

Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.3.1

admiral 1.3.0

26 Jun 11:47

Choose a tag to compare

admiral 1.3.0

New Features

  • The documentation was enhanced: (#2585)

    • The default value of an argument is now displayed in the argument description.
    • For some complex functions each example has now a title, which is also shown in
      the TOC, and a description. This enabled adding more examples without losing
      readability. The output of the structured examples used for complex functions is
      displayed in the help pages in RStudio. The following existing functions
      (as well as any new functions added in this release) received this enhancement:
      • derive_extreme_event() (#2735)
      • derive_extreme_records() (#2585)
      • derive_param_computed() (#2701)
      • derive_param_tte() (#2704)
      • derive_summary_records() (#2707)
      • derive_var_extreme_flag() (#2752)
      • derive_var_joined_exist_flag() (#2729)
      • derive_var_trtemfl() (#2746)
      • derive_vars_crit_flag() (#2744)
      • derive_vars_dt() (#2715)
      • derive_vars_dtm() (#2715)
      • derive_vars_joined() (#2727)
      • derive_vars_merged() (#2727)
      • filter_joined() (#2729)

  • New function derive_vars_joined_summary() to derive summary variables from
    selected records of an additional dataset where the selection depends on
    variables from both the input dataset and the additional dataset. For example,
    the cumulative dose up to each adverse event in ADAE can be derived with the
    new function. (#2652)

  • New lab grading metadata for US (Conventional) units for the three grading criteria
    admiral already produces for SI units (#2557).

    • atoxgr_criteria_ctcv4_uscv (NCI-CTCAEv4 criteria)
    • atoxgr_criteria_ctcv5_uscv (NCI-CTCAEv5 criteria)
    • atoxgr_criteria_daids_uscv (DAIDs criteria)

Updates of Existing Functions

  • In derive_vars_joined(), the filter_add argument is now correctly applied for all join types, fixing an issue where it was ignored when join_type != "all". (#2682)

  • The function extract_duplicate_records() was updated to consider all variables in the input dataset for the by group if the by_vars argument is omitted entirely. (#2644)

  • In slice_derivation(), previously the derivation is not called for empty
    subsets, however this can lead to issues when the input dataset is empty. Now
    the derivation is called for all subsets. (#2645)

  • The examples section for the function derive_var_trtemfl() was enhanced to include a showcasing of all scenarios discussed in the following PHUSE White Paper on Treatment-Emergent AEs. (#2455)

  • derive_var_atoxgr_dir() updated to handle more than one unit in grading metadata. Related to providing US (Conventional) units for grading (#2557).

  • NCICTCAEv4 and NCICTCAEv5 grading criteria (atoxgr_criteria_ctcv4, atoxgr_criteria_ctcv4_uscv, atoxgr_criteria_ctcv5, atoxgr_criteria_ctcv5_uscv),
    updated to add terms "Acidosis" and "Alkalosis" (#2768).

  • The functions derive_summary_records() and derive_param_exist_flag()
    were updated to fix an issue where if a variable was in both dataset_add and dataset_ref, it was
    added to the new records even if it was not in by_vars. (#2664)

  • derive_var_atoxgr_dir() updated to handle more than one unit in grading metadata. Related to providing US (Conventional) units for grading. (#2557)

  • The background checks in derive_summary_records() were too restrictive: by_vars were expected in dataset although the code did not require it. This requirement has therefore been dropped. (#2686)

  • The functions derive_vars_joined(), derive_var_joined_exist_flag(), and
    filter_joined() produce correct results now when they are used with join_type = "before" or join_type = "after" and dataset and dataset_add differ or
    the filter_add argument is used. (#2863)

  • The function derive_locf_records() was updated to include 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 (dataset_ref)
    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"). (#2694) (#2680) (#2717)

  • derive_vars_dt(), derive_vars_dtm(), impute_dtc_dt(), impute_dtc_dtm(), convert_dtc_to_dt(), & convert_dtc_to_dtm() and related functions will now throw an error instead of a warning when highest_imputation = "Y" but neither min_date (when date_imputation = "first") nor max_dates (when date_imputation = "last") are specified. (#2654)

  • create_query_data() no longer issues warnings when basket_select() objects
    with custom arguments of length greater than one are used. (#2751)

  • The order argument in derive_var_joined_exist_flag() and filter_joined()
    is now optional unless join_type = "after", join_type = "before",
    first_cond_lower, first_cond_upper, or tmp_obs_nr_var are specified.
    (#2729)

Breaking Changes

  • derive_vars_dtm() issues a message alerting users to a coming change in
    admiral 1.4.0 where the default behavior of ignore_seconds_flag will be changed from
    FALSE to TRUE. (#2661)

  • Lab grading metadata atoxgr_criteria_ctcv4(), atoxgr_criteria_ctcv5() and atoxgr_criteria_daids() variable SI_UNIT_CHECK renamed to UNIT_CHECK. (#2557)

  • The values of the variable specified for tmp_obs_nr_var in
    derive_vars_joined(), derive_var_joined_exist_flag(), filter_joined() are
    now populated differently if there are multiple records in dataset or
    dataset_add for the same values of by_vars and order. Before each of these
    records was assigned a different value, i.e., the variable (together with
    by_vars) was a unique identifier. Now the value is the same for all these
    records. (#2683)

  • The following function arguments are entering the next phase of the deprecation process: (#2487) (#2595)

    Phase 1 (message)

    • call_user_fun() is deprecated and will have no replacement. (#2678)

    • derive_param_extreme_record() is deprecated and replaced by derive_extreme_event()

    • derive_var_dthcaus() is deprecated and replaced by derive_vars_extreme_event()

    • date_source() is deprecated and replaced by event()

    • dthcaus_source() is deprecated and replaced by event()

    • derive_var_extreme_dt() and derive_var_extreme_dtm() are deprecated and replaced by
      derive_vars_extreme_event()

    • get_summary_records() is deprecated. Please use derive_summary_records() with the dataset_add
      argument and without the dataset argument.

      Phase 2 (warning)

      No functions or arguments in this Phase

      Phase 3 (error)

      No functions or arguments in this Phase

      Phase 4 (removed)

      No functions or arguments in this Phase

Documentation

  • Improved documentation, error messages, and argument assertions of derive_vars_dt(), derive_vars_dtm(), impute_dtc_dt(), impute_dtc_dtm(), convert_dtc_to_dt(), & convert_dtc_to_dtm(). (#2654)

  • Added an example to the derive_vars_transposed() reference page to showcase how duplicates-related errors can arise when records in dataset_merge are not uniquely identified. (#2609)

  • Default value of type in derive_vars_aage() is now shown as interval to match the function behavior. (#2685)

  • The "Lab Grading" vignette was updated to correct some typos and make text easier to
    read (#2623) and updated to include new metadata for grading using US (Conventional) units. (#2557)

  • The "BDS Time-to-Event" vignette was updated to include SRCSEQ consistently. (#2658)

  • The template for ADAE and the OCCDS vignette were updated to include an example of the DOSEON and DOSEU variables (#2737).

  • The template for ADPC and vignette were updated to include an example of using DTYPE for imputed records (#2657).

  • The "Higher Order Functions" vignette was updated to showcase an example of two higher order functions used in combination. The documentation for each of the higher order functions was also corrected by removing the stated requirement that the derivation takes a dataset argument (#2656).

  • The 'Details' section of the derive_var_analysis_ratio() function and the 'Derive Analysis Ratio' section of the "Creating a BDS Finding ADaM" vignette were updated to include references to R2AyHI and R2AyLO. (#2548)

  • The derive_basetype_records() documentation was updated to clarify BASETYPE derivations. (#2545)

  • The derive_extreme_records() documentation was updated to clarify which variables are populated
    from dataset_ref for the new observations. (#2664)

  • The 'Assign PARAMCD, PARAM, PARAMN, PARCAT1' section of the "Creating a BDS Finding ADaM" vignette was updated to clarify PARAM to PARCAT1 mapping. (#2547)

  • The package documentation for (1) all CRAN-released versions starting from {admiral} 1.0.0 up until the current version and (2) the latest development version (listed under "main") are all now accessible using the "Versions" selector in the toolbar. (#2766)

Various

Developer Notes
  • Removed CODEOWNERS file from repo (#2674)

admiral 1.2.0

03 Jun 18:23

Choose a tag to compare

admiral 1.2.0

New Features

  • New function derive_vars_cat() for deriving pairs of variables or more, e.g.
    AVALCATy & AVALCAyN. (#2480)
  • New function derive_vars_crit_flag() for deriving criterion flag variables
    (CRITy, CRITyFL, CRITyFN). (#2468)
  • New function transform_range() to transform values from a source range to a
    target range. (#2571)

Updates of Existing Functions

  • Added "message" as option for check_type argument in derive_var_obs_number() function. (#2481)

  • Added "message" as option for check_type argument in filter_extreme() function. (#2481)

  • Users can now specify how duplicate records are handled in derive_param_tte() using the check_type argument, with options including "error", "warning", "message", or "none", allowing for greater flexibility in managing duplicate data scenarios. (#2481)

  • The order argument has been added to event_source() and censor_source() and
    defaulted to NULL to allow specifying variables in addition to the date variable. This can be used to ensure the uniqueness of the select records if there is more than one record per date. (#2481)

  • NCICTCAEv5 grading criteria (atoxgr_criteria_ctcv5):

    • fix for TERM = "INR increased", criteria was wrongly using x ULN, for first part of criteria for grades 1 to 3. For example, ">2.5 x ULN" changed to ">2.5" for grade 3. (#2534).
    • when looking at abnormal baseline we now use BNRIND instead of comparing BASE with ANRHI, as ANRHI may differ within a subject and lab test due to data from different lab vendors. This effects 5 terms, namely, Alanine aminotransferase increased, Alkaline phosphatase increased, Aspartate aminotransferase increased, Blood bilirubin increased and GGT Increased. (#249)
    • derive_var_atoxgr_dir(): new argument abnormal_indicator to pass in value of BNRIND to indicate lab test is abnormal. This is only used for the 5 lab tests described above. (#249)
  • The keep_nas argument of derive_param_computed() was enhanced such that it
    is now possible to specify a list of variables for which NAs are acceptable.
    I.e., records are added even if some of the specified variables are NA.
    (#2510)

  • derive_param_tte() now provides a useful error message if in
    event_conditions or censor_conditions a dataset is referenced which is not
    specified in source_datasets. (#2519)

  • The derive_param_qtc() function accepts now both "ms" and "msec" as unit
    of the input parameters. (#2513)

  • In derive_vars_query() the error message was improved for the cases that
    some of the requested query variables are already present in the input dataset
    or that the queries dataset contains duplicates. (#2543)

  • derive_vars_atc() and create_single_dose_dataset() by_vars argument updated to use get_admiral_option("subject_keys") instead of USUBJID or STUDYID in bds_exposure.Rmd. (#2501)

  • The test scripts, R, and markdown files for create_single_dose_dataset() and occds.Rmd updated to include a STUDYID column because of get_admiral_option("subject_keys") update above. (#2501)

  • Update derive_vars_period() to make it work when there is only one new variable. (#2582)

  • A check was added to derive_vars_transposed() and derive_vars_atc() which
    stops execution if the records in dataset_merge or dataset_facm respectively
    are not unique. (#2563)

  • The functions derive_vars_joined(), derive_var_joined_exist_flag(),
    derive_extreme_event(), and filter_joined() were updated to reduce their
    memory consumption. As the new code increases the run-time, it is not used by
    default. To enable it the new admiral option save_memory has to be set to
    TRUE. (#2590)

  • The function compute_egfr() updated to allow missing values for sex which result in missing values for output. (#2612)

Breaking Changes

  • The following function arguments are entering the next phase of the deprecation process: (#2487) (#2595)

    Phase 1 (message)

    • derive_param_extreme_record() is deprecated and replaced by derive_extreme_event()
    • derive_var_dthcaus() is deprecated and replaced by derive_vars_extreme_event()
    • date_source() is deprecated and replaced by event()
    • dthcaus_source() is deprecated and replaced by event()
    • derive_var_extreme_dt() and derive_var_extreme_dtm() are deprecated and replaced by derive_vars_extreme_event()
    • get_summary_records() is deprecated. Please use derive_summary_records() with the dataset_add argument and without the dataset argument.

    Phase 2 (warning)

    No functions or arguments in this Phase

    Phase 3 (error)

    No functions or arguments in this Phase

    Phase 4 (removed)

    • consolidate_metadata(check_keys)
    • Removed at v1.1.1 compute_egfr(wt)
    • Removed at v1.1.1 derive_expected_records(dataset_expected_obs)
    • Removed at v1.1.1 derive_locf_records(dataset_expected_obs)
    • derive_extreme_event(ignore_event_order)
    • derive_vars_merged(match_flag)
    • derive_var_merged_summary(new_var, analysis_var, summary_fun)
    • Removed at v1.1.1 derive_param_computed(analysis_value, analysis_var)
    • derive_param_exposure(filter, analysis_var, summary_fun)
    • derive_summary_records(filter)
    • Removed at v1.1.1 derive_extreme_records(filter)
    • derive_var_joined_exist_flag(first_cond, filter)
    • event_joined(first_cond)
    • filter_joined(first_cond, filter)
    • In get_summary_records(), previously deprecated formal arguments analysis_var and
      summary_fun now removed from function, documentation, tests etc. (#2521)

Documentation

  • derive_locf_records() documentation example was fixed to display LOCF records. (#2461)

  • The "Find my function" and "Presentation Archive"" links were made more prominent in the website navigation bar. (#2536)

  • derive_var_joined_exist_flag() documentation updated with extra examples. (#2523)

  • In the derive_param_tte() documentation is was clarified which
    event/censoring is selected if there is more than one at the same date (for
    events the first one specified in event_conditions and for censoring the last
    one in censor_conditions). (#2639)

Various

  • Replace use of data("sdtm") with sdtm <- pharmaverse::sdtm in templates and vignettes. (#2498)
  • Remove dthcaus_source() calls in ADSL template because they are deprecated. (#2517)
  • Update ADEG template to flag ABLFL and ANL01FL based on DTYPE == "AVERAGE" records. (#2561)
Developer Notes
  • Created unit tests for developer internal function restricted_imputed_dtc_dt() (#2495)
  • Adopted data-raw/data R Package Convention (#2427, #2584)
  • compute_bsa() now uses the more common (but equivalent) version of the DuBois-DuBois formula for BSA. The results have not changed. (#2532)
  • Removed .devcontainer file (codespace) (#2524)
  • Restructured derive_adeg_parms.R and derive_advs_parms.R and related test files for easier reference (#2551)

admiral 1.2.0

15 Jan 21:05

Choose a tag to compare

admiral 1.2.0

New Features

  • New function derive_vars_cat() for deriving pairs of variables or more, e.g.
    AVALCATy & AVALCAyN. (#2480)
  • New function derive_vars_crit_flag() for deriving criterion flag variables
    (CRITy, CRITyFL, CRITyFN). (#2468)
  • New function transform_range() to transform values from a source range to a
    target range. (#2571)

Updates of Existing Functions

  • Added "message" as option for check_type argument in derive_var_obs_number() function. (#2481)

  • Added "message" as option for check_type argument in filter_extreme() function. (#2481)

  • Users can now specify how duplicate records are handled in derive_param_tte() using the check_type argument, with options including "error", "warning", "message", or "none", allowing for greater flexibility in managing duplicate data scenarios. (#2481)

  • The order argument has been added to event_source() and censor_source() and
    defaulted to NULL to allow specifying variables in addition to the date variable. This can be used to ensure the uniqueness of the select records if there is more than one record per date. (#2481)

  • NCICTCAEv5 grading criteria (atoxgr_criteria_ctcv5):

    • fix for TERM = "INR increased", criteria was wrongly using x ULN, for first part of criteria for grades 1 to 3. For example, ">2.5 x ULN" changed to ">2.5" for grade 3. (#2534).
    • when looking at abnormal baseline we now use BNRIND instead of comparing BASE with ANRHI, as ANRHI may differ within a subject and lab test due to data from different lab vendors. This effects 5 terms, namely, Alanine aminotransferase increased, Alkaline phosphatase increased, Aspartate aminotransferase increased, Blood bilirubin increased and GGT Increased. (#249)
    • derive_var_atoxgr_dir(): new argument abnormal_indicator to pass in value of BNRIND to indicate lab test is abnormal. This is only used for the 5 lab tests described above. (#249)
  • The keep_nas argument of derive_param_computed() was enhanced such that it
    is now possible to specify a list of variables for which NAs are acceptable.
    I.e., records are added even if some of the specified variables are NA.
    (#2510)

  • derive_param_tte() now provides a useful error message if in
    event_conditions or censor_conditions a dataset is referenced which is not
    specified in source_datasets. (#2519)

  • The derive_param_qtc() function accepts now both "ms" and "msec" as unit
    of the input parameters. (#2513)

  • In derive_vars_query() the error message was improved for the cases that
    some of the requested query variables are already present in the input dataset
    or that the queries dataset contains duplicates. (#2543)

  • derive_vars_atc() and create_single_dose_dataset() by_vars argument updated to use get_admiral_option("subject_keys") instead of USUBJID or STUDYID in bds_exposure.Rmd. (#2501)

  • The test scripts, R, and markdown files for create_single_dose_dataset() and occds.Rmd updated to include a STUDYID column because of get_admiral_option("subject_keys") update above. (#2501)

  • Update derive_vars_period() to make it work when there is only one new variable. (#2582)

  • A check was added to derive_vars_transposed() and derive_vars_atc() which
    stops execution if the records in dataset_merge or dataset_facm respectively
    are not unique. (#2563)

  • The functions derive_vars_joined(), derive_var_joined_exist_flag(),
    derive_extreme_event(), and filter_joined() were updated to reduce their
    memory consumption. As the new code increases the run-time, it is not used by
    default. To enable it the new admiral option save_memory has to be set to
    TRUE. (#2590)

  • The function compute_egfr() updated to allow missing values for sex which result in missing values for output. (#2612)

Breaking Changes

  • The following function arguments are entering the next phase of the deprecation process: (#2487) (#2595)

    Phase 1 (message)

    • derive_param_extreme_record() is deprecated and replaced by derive_extreme_event()
    • derive_var_dthcaus() is deprecated and replaced by derive_vars_extreme_event()
    • date_source() is deprecated and replaced by event()
    • dthcaus_source() is deprecated and replaced by event()
    • derive_var_extreme_dt() and derive_var_extreme_dtm() are deprecated and replaced by derive_vars_extreme_event()
    • get_summary_records() is deprecated. Please use derive_summary_records() with the dataset_add argument and without the dataset argument.

    Phase 2 (warning)

    No functions or arguments in this Phase

    Phase 3 (error)

    No functions or arguments in this Phase

    Phase 4 (removed)

    • consolidate_metadata(check_keys)
    • Removed at v1.1.1 compute_egfr(wt)
    • Removed at v1.1.1 derive_expected_records(dataset_expected_obs)
    • Removed at v1.1.1 derive_locf_records(dataset_expected_obs)
    • derive_extreme_event(ignore_event_order)
    • derive_vars_merged(match_flag)
    • derive_var_merged_summary(new_var, analysis_var, summary_fun)
    • Removed at v1.1.1 derive_param_computed(analysis_value, analysis_var)
    • derive_param_exposure(filter, analysis_var, summary_fun)
    • derive_summary_records(filter)
    • Removed at v1.1.1 derive_extreme_records(filter)
    • derive_var_joined_exist_flag(first_cond, filter)
    • event_joined(first_cond)
    • filter_joined(first_cond, filter)
    • In get_summary_records(), previously deprecated formal arguments analysis_var and
      summary_fun now removed from function, documentation, tests etc. (#2521)

Documentation

  • derive_locf_records() documentation example was fixed to display LOCF records. (#2461)

  • The "Find my function" and "Presentation Archive"" links were made more prominent in the website navigation bar. (#2536)

  • derive_var_joined_exist_flag() documentation updated with extra examples. (#2523)

  • In the derive_param_tte() documentation is was clarified which
    event/censoring is selected if there is more than one at the same date (for
    events the first one specified in event_conditions and for censoring the last
    one in censor_conditions). (#2639)

Various

  • Replace use of data("sdtm") with sdtm <- pharmaverse::sdtm in templates and vignettes. (#2498)
  • Remove dthcaus_source() calls in ADSL template because they are deprecated. (#2517)
  • Update ADEG template to flag ABLFL and ANL01FL based on DTYPE == "AVERAGE" records. (#2561)
Developer Notes
  • Created unit tests for developer internal function restricted_imputed_dtc_dt() (#2495)
  • Adopted data-raw/data R Package Convention (#2427, #2584)
  • compute_bsa() now uses the more common (but equivalent) version of the DuBois-DuBois formula for BSA. The results have not changed. (#2532)
  • Removed .devcontainer file (codespace) (#2524)
  • Restructured derive_adeg_parms.R and derive_advs_parms.R and related test files for easier reference (#2551)

v1.1.1

18 Jun 11:12
6d0d4ec

Choose a tag to compare

admiral 1.1.1

  • derive_extreme_event() was fixed such that check_type = "none" is accepted again. (#2462)

admiral 1.1.0

07 Jun 17:02
a1eb19b

Choose a tag to compare

admiral 1.1.0

New Features

  • Added helper functions to derive_vars_merged() (get_flagged_records()) and derive_vars_query() (get_vars_query()) so that those can be called independently as per user's request. derive_vars_merged() function call results are not impacted by the change (#2441).

  • Error Messaging has been made more "user-friendly". (#2372)

  • New country_code_lookup() metadata added to decode countries based on ISO 3166 codes. (#2388)

Updates of Existing Functions

  • group_var (optional) parameter is added to derive_var_trtemfl() to derive TRTEMFL for AE data if the data are collected as one episode of AE with multiple lines. (#2302)

  • Templates for ADPC, ADPPK and ADPP are updated to handle urine records. (#2392)

  • create_single_dose_dataset() has been updated to error if the lookup_table contains duplicates. (#2247)

  • derive_vars_merged() and derive_vars_transposed() have a relationship argument added (the same as found in dplyr::*_join() functions) for users to specify what type of join (one-to-one, one-to-many, etc.) should take place. (#2247)

  • basket_select() function updated to add ... argument to allow other qualifiers to be passed to user-defined function specified in get_terms_fun() argument for function create_query_data(). (#2265)

  • Messaging updated for derive_extreme_event() to improve clarity around duplicates. #2405

  • The id_vars argument was added to derive_vars_transposed() and derive_vars_atc() to allow additional variables, beyond those in by_vars, to uniquely identify records in the dataset_merge argument. (#2325)

  • Update PK Programming vignette and templates for ADPC and ADPPK for the nominal time formula NFRLT to reduce duplicate records in dose expansion with create_single_dose_dataset(). (#2426)

  • Template for ADSL updated so that EOSSTT is assigned as "ONGOING" when no study completion rows exist yet in DS. (#2436)

  • The slice_derivation() function was updated such that it works now when
    called in a function where objects from the function environment are used.
    (#2244)

Breaking Changes

  • The following function arguments are entering the next phase of the deprecation process: (#2299)

    • compute_egfr(wt)
    • consolidate_metadata(check_keys)
    • derive_expected_records(dataset_expected_obs)
    • derive_locf_records(dataset_expected_obs)
    • derive_extreme_event(ignore_event_order)
    • derive_vars_merged(match_flag, new_var, analysis_var, summary_fun)
    • derive_param_computed(analysis_value, analysis_var)
    • derive_param_exposure(filter, analysis_var, summary_fun)
    • derive_summary_records(filter)
    • derive_extreme_records(filter)
    • derive_var_joined_exist_flag(first_cond, filter)
    • event_joined(first_cond)
    • filter_joined(first_cond, filter)
  • The following function arguments have reached the end of the deprecation process and been removed: (#2299)

    • dthcaus_source(traceability_vars)
    • date_source(traceability_vars)
    • derive_var_ontrtfl(span_period)
    • derive_var_shift(na_val)
    • derive_vars_aage(unit)

Documentation

  • Documentation for derive_extreme_event() has been updated to include a description for the value of derive_extreme_event() when keep_source_vars = NULL. (#2398)

  • The "Visit and Period Variables" vignette was updated and refactored to include example code to create a period reference dataset. (#2321)

  • The documentation of derive_vars_merged() function is updated to describe that the check_type argument is ignored (an error is issued) if order is not specified. (#2326)

  • The "User Guides" section has been reorganized. A new "Programming Concepts and Conventions" vignette was also added to provide more context and information around common {admiral} behaviors and ways of working. (#2395)

  • The "Get Started" section has been revamped, placing greater focus on material that may help users familiarize themselves with {admiral}. There are now new sections showcasing the various types of {admiral}
    functions and some of the more advanced topics have been moved to the new "Programming Concepts and Conventions" vignette. (#2395)

  • The Examples section of derive_param_computed() now contains a new item showcasing how to create a derived parameter in the case that a variable contributing to the derived parameter has some/all of its values missing. (#2338)

Various

  • Templates and vignettes do not add or populate AVALC for BDS-findings datasets where the information contained in AVALC would be redundant with AVAL. (#2442)

  • The function dplyr::transmute() is superseded in favor of dplyr::mutate(.keep = "none"). Consequently, all the admiral functions that utilized the former have been updated accordingly. (#2274)

  • The templates for ADPP and ADPC are updated for missing variables (#2308) and to make ATPT and ATPTN consistent. (#2328)

  • ADLB template updated to make PARAM consistent for PARAMCD values "BASO" and "LYMPH". (#2327)

Developer Notes
  • In the previous version, renv was the default framework used to manage package dependencies. Now, we use devtools as our main package manager (some changes also occurred for admiralci workflows).
    There is a possibility to get package dependency versions used for the workflows to ensure local reproducibility. For this, you need to go under the latest action summary in your current PR. You can see a deps artifact. For each version of R used for R CMD CHECKS jobs, there is an associated renv.lock file (under the deps artifact).
  • Splitting out R and test files for date/time functions for cyclomatic complexity refactor (#2340)(#2339)
  • Created three unit tests for get_summary_records(). (#2304)
  • Created unit tests for developer internal function get_imputation_target_date() (#2378)
  • Modified date/time unit tests to use unified example (#2424)

admiral 1.0.2

06 Mar 19:56

Choose a tag to compare

Fix bug in derive_param_tte() where argument dataset populated and PARAMCD in set_values_to argument is an expression. Previously, there was a check early in function to see if PARAMCD defined in set_values_to argument, already existed in the dataset passed into dataset argument. If PARAMCD was not an expression i.e. PARAMCD = "XYZ" then check worked. However, if PARAMCD to be created was an expression, and wasn't resolved yet, this caused an ERROR. The check has been moved to near the end of the function, where PARAMCD is resolved in the dataset holding the new parameters. (#2336)

admiral 1.0.1

02 Feb 19:22

Choose a tag to compare

  • Fix bug in derive_vars_query() where if AE terms were in mixed case no terms are flagged. (#2311)