Releases: pharmaverse/admiral
v1.4.1
admiral 1.4.1
Updates of Existing Functions
- Grading metadata amended to ensure the criteria is exactly the same across
SIandCVunits
when theUNIT_CHECKis identical or missing for a particularTERM. This allows grading metadata
to be combined acrossSIandCVunits. Also, comment added about"Creatinine Clearance"and lab
values less than 10 forNCICTCAEv6.DAIDsgrading metadata updated to useADLB.ADTinstead of
ADLB.LBDT(#2958).
Documentation
v1.4.0
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 deriveNFRLTfrom timepoint
and visit (e.g.VISITDYandPCTPT). (#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
ADABtemplate script availablead_adab.Rwhich 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
viaatoxgr_criteria_ctcv6andatoxgr_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(), andderive_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 ifargs = NULL
is specified. (#2875) -
derive_summary_records()now issues an error if a non summary function is
used inset_values_towhich results in multiple records per by group. (#2872) -
derive_summary_records()was updated to allow constants to be provided under the
constant_valuesargument, which will be present in both summary and missing rows. (#2668)
Breaking Changes
-
In
derive_var_atoxgr_dir(), theabnormal_indicatorargument is deprecated and replaced withlow_indicator
andhigh_indicatorarguments. 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_flagis set toTRUE. (#2798) -
derive_var_merged_summary()is deprecated and will be replaced byderive_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 newlow_indicatorand
high_indicatorarguments for enhanced flexibility in lab grading. (#1858)derive_var_merged_summary()is deprecated and will be replaced byderive_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 byderive_extreme_event().derive_var_dthcaus()is deprecated and replaced byderive_vars_extreme_event().date_source()is deprecated and replaced byevent().dthcaus_source()is deprecated and replaced byevent().derive_var_extreme_dt()andderive_var_extreme_dtm()are deprecated and replaced by
derive_vars_extreme_event().get_summary_records()is deprecated. Please usederive_summary_records()with thedataset_add
argument and without thedatasetargument.
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 newlow_indicatorandhigh_indicatorarguments. (#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
ASEQafter any new rows. (#2780) -
ADLBHYtemplate was updated to keepPARAMin 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) usingderive_vars_aage(). This includes deriving birth date (BRTHDT) from birth date character variable (BRTHDTC) usingderive_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(), clarifyhighest_imputationdefinitions and expand date examples. (#2841) -
The documentation was enhanced: (#2585)
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
What's Changed
- fix: Re-enable search index generation by @cicdguy in #2777
- Closes #2785 added company logos in sidebar by @manciniedoardo in #2786
- Closes #2785 2nd try: update footer and company links by @manciniedoardo in #2787
- Closes #2782: Updates in adsl template and vignette to make SAFFL CDISC compliant by @Lina2689 in #2790
- [skip vbump] Closes #2788 fix_links: use vignette("vignette name") in function documentation by @bundfussr in #2791
Full Changelog: v1.3.0...v1.3.1
admiral 1.3.0
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 inADAEcan be derived with the
new function. (#2652) -
New lab grading metadata for US (Conventional) units for the three grading criteria
admiralalready 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(), thefilter_addargument is now correctly applied for all join types, fixing an issue where it was ignored whenjoin_type != "all". (#2682) -
The function
extract_duplicate_records()was updated to consider all variables in the input dataset for the by group if theby_varsargument 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()andderive_param_exist_flag()
were updated to fix an issue where if a variable was in bothdataset_addanddataset_ref, it was
added to the new records even if it was not inby_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_varswere expected indatasetalthough 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 withjoin_type = "before"orjoin_type = "after"anddatasetanddataset_adddiffer or
thefilter_addargument is used. (#2863) -
The function
derive_locf_records()was updated to include two new arguments:id_vars_refandimputation.
Theid_vars_refargument 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. Theimputationargument lets users decide whether
to updateanalysis_varwhen its value isNA("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 whenhighest_imputation = "Y"but neithermin_date(whendate_imputation = "first") normax_dates(whendate_imputation = "last") are specified. (#2654) -
create_query_data()no longer issues warnings whenbasket_select()objects
with custom arguments of length greater than one are used. (#2751) -
The
orderargument inderive_var_joined_exist_flag()andfilter_joined()
is now optional unlessjoin_type = "after",join_type = "before",
first_cond_lower,first_cond_upper, ortmp_obs_nr_varare specified.
(#2729)
Breaking Changes
-
derive_vars_dtm()issues a message alerting users to a coming change in
admiral 1.4.0where the default behavior ofignore_seconds_flagwill be changed from
FALSEtoTRUE. (#2661) -
Lab grading metadata
atoxgr_criteria_ctcv4(),atoxgr_criteria_ctcv5()andatoxgr_criteria_daids()variableSI_UNIT_CHECKrenamed toUNIT_CHECK. (#2557) -
The values of the variable specified for
tmp_obs_nr_varin
derive_vars_joined(),derive_var_joined_exist_flag(),filter_joined()are
now populated differently if there are multiple records indatasetor
dataset_addfor the same values ofby_varsandorder. 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 byderive_extreme_event() -
derive_var_dthcaus()is deprecated and replaced byderive_vars_extreme_event() -
date_source()is deprecated and replaced byevent() -
dthcaus_source()is deprecated and replaced byevent() -
derive_var_extreme_dt()andderive_var_extreme_dtm()are deprecated and replaced by
derive_vars_extreme_event() -
get_summary_records()is deprecated. Please usederive_summary_records()with thedataset_add
argument and without thedatasetargument.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 indataset_mergeare not uniquely identified. (#2609) -
Default value of
typeinderive_vars_aage()is now shown asintervalto 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
SRCSEQconsistently. (#2658) -
The template for ADAE and the OCCDS vignette were updated to include an example of the
DOSEONandDOSEUvariables (#2737). -
The template for ADPC and vignette were updated to include an example of using
DTYPEfor 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
derivationtakes adatasetargument (#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 toR2AyHIandR2AyLO. (#2548) -
The
derive_basetype_records()documentation was updated to clarifyBASETYPEderivations. (#2545) -
The
derive_extreme_records()documentation was updated to clarify which variables are populated
fromdataset_reffor the new observations. (#2664) -
The 'Assign
PARAMCD,PARAM,PARAMN,PARCAT1' section of the "Creating a BDS Finding ADaM" vignette was updated to clarifyPARAMtoPARCAT1mapping. (#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
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 forcheck_typeargument inderive_var_obs_number()function. (#2481) -
Added
"message"as option forcheck_typeargument infilter_extreme()function. (#2481) -
Users can now specify how duplicate records are handled in
derive_param_tte()using thecheck_typeargument, with options including"error","warning","message", or"none", allowing for greater flexibility in managing duplicate data scenarios. (#2481) -
The
orderargument has been added toevent_source()andcensor_source()and
defaulted toNULLto 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 usingx 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
BNRINDinstead of comparingBASEwithANRHI, asANRHImay 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 increasedandGGT Increased. (#249) derive_var_atoxgr_dir(): new argumentabnormal_indicatorto pass in value ofBNRINDto indicate lab test is abnormal. This is only used for the 5 lab tests described above. (#249)
- fix for
-
The
keep_nasargument ofderive_param_computed()was enhanced such that it
is now possible to specify a list of variables for whichNAs are acceptable.
I.e., records are added even if some of the specified variables areNA.
(#2510) -
derive_param_tte()now provides a useful error message if in
event_conditionsorcensor_conditionsa dataset is referenced which is not
specified insource_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()andcreate_single_dose_dataset()by_varsargument updated to useget_admiral_option("subject_keys")instead ofUSUBJIDorSTUDYIDinbds_exposure.Rmd. (#2501) -
The test scripts, R, and markdown files for
create_single_dose_dataset()andoccds.Rmdupdated to include aSTUDYIDcolumn because ofget_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()andderive_vars_atc()which
stops execution if the records indataset_mergeordataset_facmrespectively
are not unique. (#2563) -
The functions
derive_vars_joined(),derive_var_joined_exist_flag(),
derive_extreme_event(), andfilter_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 optionsave_memoryhas 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 byderive_extreme_event()derive_var_dthcaus()is deprecated and replaced byderive_vars_extreme_event()date_source()is deprecated and replaced byevent()dthcaus_source()is deprecated and replaced byevent()derive_var_extreme_dt()andderive_var_extreme_dtm()are deprecated and replaced byderive_vars_extreme_event()get_summary_records()is deprecated. Please usederive_summary_records()with thedataset_addargument and without thedatasetargument.
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 argumentsanalysis_varand
summary_funnow 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 inevent_conditionsand for censoring the last
one incensor_conditions). (#2639)
Various
- Replace use of
data("sdtm")withsdtm <- pharmaverse::sdtmin templates and vignettes. (#2498) - Remove
dthcaus_source()calls inADSLtemplate because they are deprecated. (#2517) - Update
ADEGtemplate to flagABLFLandANL01FLbased onDTYPE == "AVERAGE"records. (#2561)
Developer Notes
- Created unit tests for developer internal function
restricted_imputed_dtc_dt()(#2495) - Adopted
data-raw/dataR 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
.devcontainerfile (codespace) (#2524) - Restructured
derive_adeg_parms.Randderive_advs_parms.Rand related test files for easier reference (#2551)
admiral 1.2.0
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 forcheck_typeargument inderive_var_obs_number()function. (#2481) -
Added
"message"as option forcheck_typeargument infilter_extreme()function. (#2481) -
Users can now specify how duplicate records are handled in
derive_param_tte()using thecheck_typeargument, with options including"error","warning","message", or"none", allowing for greater flexibility in managing duplicate data scenarios. (#2481) -
The
orderargument has been added toevent_source()andcensor_source()and
defaulted toNULLto 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 usingx 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
BNRINDinstead of comparingBASEwithANRHI, asANRHImay 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 increasedandGGT Increased. (#249) derive_var_atoxgr_dir(): new argumentabnormal_indicatorto pass in value ofBNRINDto indicate lab test is abnormal. This is only used for the 5 lab tests described above. (#249)
- fix for
-
The
keep_nasargument ofderive_param_computed()was enhanced such that it
is now possible to specify a list of variables for whichNAs are acceptable.
I.e., records are added even if some of the specified variables areNA.
(#2510) -
derive_param_tte()now provides a useful error message if in
event_conditionsorcensor_conditionsa dataset is referenced which is not
specified insource_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()andcreate_single_dose_dataset()by_varsargument updated to useget_admiral_option("subject_keys")instead ofUSUBJIDorSTUDYIDinbds_exposure.Rmd. (#2501) -
The test scripts, R, and markdown files for
create_single_dose_dataset()andoccds.Rmdupdated to include aSTUDYIDcolumn because ofget_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()andderive_vars_atc()which
stops execution if the records indataset_mergeordataset_facmrespectively
are not unique. (#2563) -
The functions
derive_vars_joined(),derive_var_joined_exist_flag(),
derive_extreme_event(), andfilter_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 optionsave_memoryhas 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 byderive_extreme_event()derive_var_dthcaus()is deprecated and replaced byderive_vars_extreme_event()date_source()is deprecated and replaced byevent()dthcaus_source()is deprecated and replaced byevent()derive_var_extreme_dt()andderive_var_extreme_dtm()are deprecated and replaced byderive_vars_extreme_event()get_summary_records()is deprecated. Please usederive_summary_records()with thedataset_addargument and without thedatasetargument.
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 argumentsanalysis_varand
summary_funnow 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 inevent_conditionsand for censoring the last
one incensor_conditions). (#2639)
Various
- Replace use of
data("sdtm")withsdtm <- pharmaverse::sdtmin templates and vignettes. (#2498) - Remove
dthcaus_source()calls inADSLtemplate because they are deprecated. (#2517) - Update
ADEGtemplate to flagABLFLandANL01FLbased onDTYPE == "AVERAGE"records. (#2561)
Developer Notes
- Created unit tests for developer internal function
restricted_imputed_dtc_dt()(#2495) - Adopted
data-raw/dataR 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
.devcontainerfile (codespace) (#2524) - Restructured
derive_adeg_parms.Randderive_advs_parms.Rand related test files for easier reference (#2551)
v1.1.1
admiral 1.1.0
admiral 1.1.0
New Features
-
Added helper functions to
derive_vars_merged()(get_flagged_records()) andderive_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 toderive_var_trtemfl()to deriveTRTEMFLfor 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 thelookup_tablecontains duplicates. (#2247) -
derive_vars_merged()andderive_vars_transposed()have arelationshipargument added (the same as found indplyr::*_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 inget_terms_fun()argument for functioncreate_query_data(). (#2265) -
Messaging updated for
derive_extreme_event()to improve clarity around duplicates. #2405 -
The
id_varsargument was added toderive_vars_transposed()andderive_vars_atc()to allow additional variables, beyond those inby_vars, to uniquely identify records in thedataset_mergeargument. (#2325) -
Update PK Programming vignette and templates for ADPC and ADPPK for the nominal time formula
NFRLTto reduce duplicate records in dose expansion withcreate_single_dose_dataset(). (#2426) -
Template for ADSL updated so that
EOSSTTis 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 ofderive_extreme_event()whenkeep_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 thecheck_typeargument is ignored (an error is issued) iforderis 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
AVALCfor BDS-findings datasets where the information contained inAVALCwould be redundant withAVAL. (#2442) -
The function
dplyr::transmute()is superseded in favor ofdplyr::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
ATPTandATPTNconsistent. (#2328) -
ADLB template updated to make
PARAMconsistent forPARAMCDvalues"BASO"and"LYMPH". (#2327)
Developer Notes
- In the previous version,
renvwas the default framework used to manage package dependencies. Now, we usedevtoolsas 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 forR CMD CHECKSjobs, there is an associated renv.lock file (under the deps artifact). - Splitting out
Randtestfiles 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
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
- Fix bug in
derive_vars_query()where if AE terms were in mixed case no terms are flagged. (#2311)