admiral 0.9.0
admiral 0.9.0
New Features
-
The new function
derive_vars_joined()
adds variables from an additional
dataset. The selection of the observations can depend on variables from both
datasets. This can be used for addingAVISIT
,AWLO
,AWHI
based on time
windows andADY
or deriving the lowest value (nadir) before the current
observation (#1448). -
New function
derive_var_trtemfl()
for deriving treatment emergent flags (#989) -
The new function
chr2vars()
turns a character vector into a list of quosures
(#1448). -
New function
derive_var_relative_flag()
for flagging observations before or
after a condition is fulfilled (#1453) -
New functions
get_admiral_option()
andset_admiral_options()
to allow more
flexibility on common function inputs; e.g. likesubject_keys
to avoid several
find and replace instances ofvars(STUDYID, USUBJID)
. (#1338) -
The new function
create_period_dataset()
for creating a reference dataset
for subperiods, periods, or phases from the ADSL dataset was added. The
reference dataset can be used to create subperiod, period, and phase variables
in OCCDS and BDS datasets. (#1477) -
The new function
derive_vars_period()
adds subperiod, period, or phase
variables to ADSL. The values for the new variables are provided by a period
reference dataset. (#1477) -
New function
derive_var_merged_summary()
adds a variable of summarized
values to the input dataset (#1564) -
A
print()
method was added for all S3 objects defined by admiral, e.g.,
date_source()
,dthcaus_source()
, ... (#858) -
New metadata data set called
atoxgr_criteria_ctcv5
which holds criteria for lab grading
based on Common Terminology Criteria for Adverse Events (CTCAE) v5.0 -
Removed the
{assertthat}
dependency in{admiral}
(#1392) -
Removed R Version 3.6 check in CI/CD workflows in favor of the three most recent versions: 4.0, 4.1 and 4.2. (#1556)
-
The new function
derive_locf_records()
adds LOCF records as new observations.
This can be used when the input dataset does not contain observations for missed
visits/time points or whenAVAL
isNA
for particular visits/time points (#1316). -
New function
convert_na_to_blanks()
to convert characterNA
to blanks (#1624)
Updates of Existing Functions
-
Function
derive_param_first_event()
has been replaced by a more generalizedderive_param_extreme_event()
function with new argumentmode
allowing for the selection of either the"first"
or"last"
event record according to the conditions provided. Also thedate_var
argument has been replaced with theorder
argument instead. In addition, three new argumentsnew_var
,true_value
, andfalse_value
have been added to allow the user to choose what variable is used to indicate whether an event happened, and the values it is given (#1317) (#1242). -
Argument
ignore_time_for_ref_end_date
was added toderive_var_ontrtfl()
,
which controls if time is considered for the condition ifstart_date
is after
ref_end_date
+ref_end_window
days (#989). -
derive_var_atoxgr_dir()
default value ofatoxgr_criteria_ctcv4
removed for
parametermeta_criteria
. Can now also chooseatoxgr_criteria_ctcv5
for parameter
meta_criteria
, to implement NCI-CTCAEv5 grading criteria . -
Environment objects were consolidated into a single
admiral_environment
object underR/admiral__environment.R
. (#1572) -
The default value of the
keep_source_vars
argument in
create_single_dose_dataset()
was updated such that it takes the values of the
other arguments into account and thestart_datetime
andend_datetime
arguments are optional now (#1598). -
Function
create_query_data()
has been updated such that the dictionary
version is stored in the output dataset (#1337).
Breaking Changes
-
Function
derive_param_first_event()
has been deprecated. Please usederive_param_extreme_event()
with theorder
argument instead of thedate_var
argument (#1317). -
Functions
smq_select()
andsdg_select()
have been deprecated and replaced withbasket_select()
. In thecreate_query_data()
function,meddra_version
andwhodd_version
argument has been replaced byversion
andget_smq_fun
andget_sdg_fun
argument byget_terms_fun
. (#1597)
Documentation
Various
-
Function
derive_param_tte()
had a bug that setADT
toNA
whenstart_date
was missing, which has now been fixed (#1540) -
Function
derive_vars_merged()
had an improperly formatted error message
which has been corrected (#1473) -
Templates now save datasets as
.rds
instead of.rda
(#1501) -
Function
create_single_dose_dataset()
no longer fails if the input dataset
contains observations with dose frequency"ONCE"
(#1375).