admiral 1.0.0
admiral 1.0.0
New Features
-
The new function
derive_vars_extreme_event()
, which works asderive_extreme_event()
but adds variables instead of a parameter. (#2138) -
The new function
derive_var_merged_ef_msrc()
is provided to add a flag
indicating if one of the conditions in one of multiple source datasets is
fulfilled. (#1728) -
New global option created
signif_digits
and added toset_admiral_options()
to
handle floating point issue, the value is set to15
, and is used with thebase R
functionsignif()
when comparing 2 numeric values. This is implemented inadmiral
functionsderive_var_atoxgr_dir()
andderive_var_anrind()
. (#2134)For more information, please see blog: How admiral handles floating points
-
The new function
derive_vars_computed()
is provided which has the same
functionality asderive_param_computed()
but instead of adding the computed
values as a new parameter, adds it as a new variable. (#2178)
Updates of Existing Functions
-
Fixed a bug in
compute_tmf()
where the time imputation flag was being incorrectly
populated when any of the existing time components (hour, minute and/or second) of the date
character vector ('--DTC'
), was imputed. (#2146) -
derive_extreme_records()
,derive_var_extreme_flag()
,derive_vars_joined()
andderive_vars_merged()
were enhanced with the argumentstrue_value
andfalse_value
to align with preexisting functions that had similar functionality. (#2125) -
restrict_derivation()
now allows{dplyr}
functions likemutate()
in the
derivation
argument. (#2143) -
derive_summary_records()
,derive_var_merged_summary()
, andget_summary_records()
were enhanced such that more than one summary variable can be derived, e.g.,
AVAL
as the sum andADT
as the maximum of the contributing records. (#1792) -
derive_summary_records()
was enhanced with the following arguments:dataset_add
(required),dataset_ref
(optional),missing_values
(optional). These arguments respectively, generate summary variables from additional datasets, retain/add specific records from a reference dataset, and impute user-defined missing values. Note thatdataset_add
can be set to the same value asdataset
if a different additional dataset is not required.derive_param_exposure()
was enhanced withdataset_add
as well. (#2142) -
The
missing_values
argument was added toderive_var_merged_summary()
. It
allows to define values for by groups, e.g., subjects which are not in the
additional dataset. (#2230) -
The argument
dataset
is now optional forderive_summary_records()
andderive_param_exposure()
. (#2142) -
The "joined" functions (
derive_vars_joined()
,derive_var_joined_exist_flag()
,
filter_joined()
, andevent_joined()
) were unified: (#2126)- The
dataset_add
andfilter_add
arguments were added to
derive_var_joined_exist_flag()
andfilter_joined()
. - The
filter
argument was renamed tofilter_join
in
derive_var_joined_exist_flag()
andfilter_joined()
. - The
tmp_obs_nr_var
, thejoin_type
, thefirst_cond_lower
, and the
first_cond_upper
arguments were added toderive_vars_joined()
. - In
derive_var_joined_exist_flag()
,filter_joined()
, andevent_joined()
thefirst_cond
argument was renamed tofirst_cond_upper
and the
first_cond_lower
argument was added. - In all "joined" functions the
filter_add
argument is applied to the
additional dataset grouped byby_vars
and thefilter_join
argument is
applied to the joined dataset grouped by the observations from the input
dataset. I.e., summary functions likeall()
orany()
can be used.
- The
-
The
tmp_event_nr_var
argument was added toderive_extreme_records()
to
allow more control of the selection of records. It creates a temporary variable
for the event number, which can be used inorder
. (#2140) -
signif_dig
argument added to bothderive_var_atoxgr_dir()
andderive_var_anrind()
functions with default value set to general optionsignif_digits
. The new argument to
these functions handles any floating point issues. (#2134) -
Fixed a bug in
derive_vars_period()
where the function was throwing an error wheneverdataset_ref
contained variables that were neither key variables, norAPERIOD
,ASPER
,APHASEN
, nor mentioned in thenew_vars
argument. (#2231) -
compute_duration()
,derive_vars_duration()
,derive_vars_aage()
now accepts more terms for thein_unit
,out_unit
, andage_unit
arguments (#2255) -
Updated the unit test for
derive_var_obs_number()
. The new test checked the derivation of the default and customizednew_var
,
sorting with the the missing value and expected conditions. (#2260) -
The check for existence of
TERMNUM
/TERMCHAR
in queries dataset is now less strict depending on values ofSRCVAR
forderive_vars_query()
(#2264) -
DAIDS grading criteria fixed for
Grade = 0
forTERM = "Absolute Lymphocyte Count, Low"
, criteria wasAVAL <= 0.65
, now corrected toAVAL >= 0.65
(#2284). -
A bug in
derive_extreme_event()
was fixed. Thecondition
field is no
longer ignored ifmode
is specified forevent()
(#2291). -
A bug in
derive_vars_joined()
was fixed. The function no longer fails if
renaming is used inby_vars
andnew_vars
is not specified (#2289).
Breaking Changes
-
{admiral}
now only supports R >= 4.0.0 -
In
derive_extreme_records()
thedataset_add
argument is now mandatory. (#2139) -
In
derive_summary_records()
andget_summary_records()
the arguments
analysis_var
andsummary_fun
were deprecated in favor ofset_values_to
.
(#1792) -
In
derive_summary_records()
andderive_param_exposure()
the argumentfilter
was renamed tofilter_add
(#2142) -
In
derive_var_merged_summary()
the argumentsnew_var
,analysis_var
, and
summary_fun
were deprecated in favor ofnew_vars
. (#1792) -
In
derive_vars_merged()
, the argumentmatch_flag
was renamed toexist_flag
(#2125) -
The default value for the
false_value
argument inderive_extreme_records()
was changed toNA_character_
(#2125) -
In
consolidate_metadata()
, the argumentcheck_keys
was renamed tocheck_type
to align with other functions (#2184) -
In
filter_joined()
andderive_var_joined_exist_flag()
(#2126)- the
first_cond
argument was deprecated in favor offirst_cond_upper
and - the
filter
argument was deprecated in favor offilter_join
.
- the
-
In
event_joined()
thefirst_cond
argument was deprecated in favor of
first_cond_upper
. (#2126) -
In
derive_extreme_event()
, theignore_event_order
argument was deprecated
and the selection of the records was changed to allow more control. Before, the
records were selected first by event and then byorder
. Now they are selected
byorder
only, but the event number can be added to it.To achieve the old behavior update
order = exprs(my_order_var),
ignore_event_order = FALSE,
to
tmp_event_nr_var = event_nr,
order = exprs(event_nr, my_order_var),
and
order = exprs(my_order_var),
ignore_event_order = TRUE,
to
order = exprs(my_order_var),
-
create_query_data()
andderive_vars_query()
were updated to rename variables in
query data set as follows: (#2186)TERMNAME
toTERMCHAR
TERMID
toTERMNUM
Users need to adjust their
get_terms()
function accordingly. -
The following functions, which were deprecated in previous
{admiral}
versions, have been removed: (#2098)derive_param_extreme_event()
derive_vars_last_dose()
derive_var_last_dose_amt()
derive_var_last_dose_date()
derive_var_last_dose_grp()
derive_var_basetype()
derive_var_merged_cat()
derive_var_merged_character()
derive_var_confirmation_flag()
-
The following function arguments are entering the next phase of the deprecation process: (#2098)
compute_egfr(wt)
derive_extreme_records(filter)
derive_param_computed(analysis_value, analysis_var)
derive_var_shift(na_val)
derive_expected_records(dataset_expected_obs)
derive_var_ontrtfl(span_period)
-
The
derive_param_extreme_record()
function has been superseded in favor ofderive_extreme_event()
. (#2141) -
The functions
derive_var_dthcaus()
,derive_var_extreme_dt()
, andderive_var_extreme_dtm()
have been superseded in favor ofderive_vars_extreme_event()
. (#2138)
Documentation
-
The documentation of the
by_vars
andconstant_by_vars
argument was improved and unified across all functions where it is used. (#2137) -
The functions
assert_db_requirements()
,assert_terms()
,assert_valid_queries()
,
extend_source_datasets()
,filter_date_sources()
,validate_basket_select()
,
validate_query()
are no longer exported and have had documentation removed. (#2220) -
The function
extract_duplicate_records()
has been re-classified as aninternal
function, which means that the function still appears in our help pages but not
on our website. (#2220) -
The "Generic Functions" vignette (now "Generic Derivations") was rewritten.
Now it provides a more complete overview of the generic derivations, describe
the common concepts, and makes it easier to find the appropriate function.
(#2230) -
A way to standardize roxygen labels and descriptions for function arguments was implemented and tested. (#2034)
-
A link to published CDISC Population PK (ADPPK) implementation guide was added. (#2161)
-
Removed Deprecation section in Reference tab. Added new Superseded section in
Reference tab. (#2174) -
Added a link to the previous versions of the website to the navigation bar. (#2205)
-
The meaning of
date_imputation = "mid"
was clarified in the documentation of
the imputation functions, e.g.derive_vars_dtm()
. (#2222) -
Added an example derivation of
DTHCGR1
to the ADSL vignette. (#2218) -
Moved Development Process from
{admiraldev}
to Contribution Model in the
admiral
website, updated GitHub strategy. (#2196) -
Added new drop downs in Get Started navigation bar- Getting Started, Admiral Discovery, Cheatsheet. Community removed from top. (#2217)
-
All "Example Script(s)" sections in the User Guide vignettes were updated to point the user towards using
use_ad_template("ADaM")
rather
than linking to the template in the code repository. (#2239) -
Handling of
NA
values was added to the documentation of theorder
argument
for all functions. (#2230, #2257)