Changelog
Source:NEWS.md
admiral 0.11.0
Breaking Changes
-
The following functions, which were deprecated in previous admiral versions, have been removed (#1747):
derive_vars_merged_dt()
derive_vars_merged_dtm()
derive_var_agegr_ema()
derive_var_agegr_fda()
derive_param_first_event()
derive_derived_param()
derive_var_confirmation_flag()
filter_confirmation()
-
The following functions have been deprecated from previous admiral versions using the next phase of the deprecation process (#1747):
Various
vars()
which was used in the admiral function calls that expected a list of quosures has been removed (#1747).Examples for
derive_var_extreme_flag()
were reworked to reduce runtime that occasionally led to failing CI check (#1780)
admiral 0.10.1
CRAN release: 2023-03-14
- Fix checks on
derive_vars_dtm()
andderive_vars_dt()
that were too restrictive. (#1810)
admiral 0.10.0
CRAN release: 2023-03-08
New Features
Using testthat 3rd edition for unit testing. This is stricter in that messages must be addressed and deprecated functions throw errors. (#1754)
New function
consolidate_metadata()
for consolidating multiple meta datasets into a single one (#1479)New function
compute_scale()
for computing the average of a vector and transforming the result from a source to a target range. (#1692)New ADPC template script available
ad_adpc.R
which creates PK Concentration Analysis Dataset (#849). This script includes formatting suitable for Non-Compartmental Analysis (ADNCA) (#851)New function
derive_expected_records()
for adding expected records (#1729)New function
derive_extreme_event()
for adding the worst or best observation for each by group as new records (#1755)
Updates of Existing Functions
Arguments
analysis_var
,keep_vars
were added toderive_locf_records()
,analysis_var
allows to specify analysis variable,keep_vars
keeps variables that need carrying the last observation forward other thananalysis_var
(e.g.,PARAMN
,VISITNUM
) (#1636).The function
create_single_dose_dataset()
adds support for expanding relative nominal time (e.g. NFRLT) used in Pharmacokinetic (PK) analyses. The new parameternominal_time
defaults asNULL
and does not change the normal operation of the function. If anominal_time
is specified such as NFRLT (Nominal Relative Time from First Dose) then the nominal time is incremented by the interval specified inEXDOSFRQ
for example for “QD” records the NFRLT is incremented by 24 hours, e.g. 0, 24, 48…(#1640).create_single_dose_dataset()
is also updated for values ofEXDOSFRQ
with units in days but expected values less than 24 hours, such as “BID”, “TID”, and “QID”. Previously these values ofEXDOSFRQ
may result in duplicate records where the day values are incremented but the time values are not (#1643)The function
derive_var_confirmation_flag()
andfilter_confirmation()
gained thetmp_obs_nr_var
argument. It helps flagging or selecting consecutive observations or the first or last observation in a by group. (#1724)The functions
derive_vars_merged()
,derive_var_merged_cat()
,derive_var_merged_character()
,derive_var_merged_exist_flag()
,derive_var_merged_summary()
, andderive_vars_merged_lookup()
were updated to allow renaming in the argumentby_vars
(#1680).The units “min” and “sec” are added as valid values of
out_unit
incompute_duration()
andderive_vars_duration()
(#1647).The function
derive_vars_query()
now includes a consistency check forQUERY_SCOPE
andQUERY_SCOPE_NUM
values. (#652)Argument
new_var
inderive_param_extreme_event()
is made optional. (#1630)derive_vars_last_dose()
no longer fails ifUSUBJID
is not included in the input dataset. (#1787)
Breaking Changes
-
All function arguments which expected a list of quosures created by
vars()
are now expecting a list of expressions created byexprs()
. For example, instead ofby_vars = vars(STUDYID, USUBJID)
by_vars = exprs(STUDYID, USUBJID)
must be used now.To enable running old scripts using
vars()
in the admiral function calls admiral redefines thevars()
function such that it returns a list of expressions. This can be disabled by the admiral optionforce_admiral_vars
(seeset_admiral_options()
). Please note that this is a temporary solution and will be removed in a future admiral release. (#1627) Function
derive_param_tte()
has been updated such that only observations are added for subjects who have both an event or censoring and an observation indataset_adsl
(#1576).Function
derive_var_disposition_status()
has been deprecated, please usederive_var_merged_cat()
instead (#1681).Function
derive_var_worst_flag()
has been deprecated, in favor ofslice_derivation()
/derive_var_extreme_flag()
(#1682)Function
derive_vars_disposition_reason()
has been deprecated, in favor ofderive_vars_merged()
(#1683)-
The following functions have been deprecated from previous admiral versions using the next phase of the deprecation process: (#1712)
derive_derived_param()
derive_param_first_event()
derive_vars_merged_dt()
derive_vars_merged_dtm()
derive_var_agegr_ema()
derive_var_agegr_fda()
-
The following functions, which were deprecated in previous admiral versions, have been removed (#1712):
derive_var_ady()
derive_var_aendy()
derive_var_astdy()
derive_var_atirel()
derive_vars_suppqual()
smq_select()
sdg_select()
-
The following parameters, which were deprecated in previous admiral versions, have been removed (#1712):
-
meddra_version
,whodd_version
,get_smq_fun
andget_sdg_fun
from thecreate_query_data()
function -
date_imputation
,time_imputation
andpreserve
parameters fromdate_source()
function -
filter
parameter fromderive_var_extreme_flag()
-
ADLB
metadata data set calledatoxgr_criteria_ctcv5
updated to remove unit check forHYPERURICEMIA
as grade criteria based onANRHI
only. This metadata holds criteria for lab grading based on Common Terminology Criteria for Adverse Events (CTCAE) v5.0 (#1650)Renamed
derive_var_confirmation_flag()
andfilter_confirmation()
toderive_var_joined_exist_flag()
andfilter_joined()
respectively (#1738).
Documentation
New vignette “Creating a PK NCA ADaM (ADPC/ADNCA)” (#1639)
New vignette “Hy’s Law Implementation” (#1637)
New vignette “Creating Questionnaire ADaMs” (#1715)
The expected value for the
derivation
argument ofrestrict_derivation()
,slice_derivation()
, andcall_derivation()
is described now. (#1698)Removed authors from function documentation, as we will now only be tracking an overall list of authors for admiral. (#1673)
Added an imputation example for
create_single_source_dataset()
in function documentation (#1408)(#1760)Updates to examples for
derive_var_age_years()
andderive_vars_duration()
(#1620)(#1634)Increased the level of documentation for
derive_var_age_years()
to describe the data type of the newly creatednew_var
column. (#970)
Various
- Functions
derive_vars_dtm()
andderive_vars_dt()
had a bug pertaining to imputations associated withNA
values that has now been fixed (#1646)
admiral 0.9.1
CRAN release: 2022-12-23
- Implement changes to
if_else()
from the release ofdplyr
version 1.1.0, which affectsderive_vars_dtm()
andand compute_tmf()
. (#1641)
admiral 0.9.0
CRAN release: 2022-12-06
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.0Removed 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 afterref_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 parametermeta_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 increate_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)
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).
admiral 0.8.4
CRAN release: 2022-10-14
- Fixed a bug where a recent update to
{lifecylce}
caused severaladmiral
tests to break (#1500)
admiral 0.8.3
CRAN release: 2022-10-07
- Second attempt to address issue where CRAN identified a failing test when “a strict Latin-1* locale” is used (#1469)
- Fixed a bug in
derive_vars_duration()
that surfaced after changes in R-devel (#1486)
admiral 0.8.2
CRAN release: 2022-09-29
- Fixed an issue where CRAN identified a failing test when “a strict Latin-1* locale” is used (#1469)
admiral 0.8.1
CRAN release: 2022-09-20
-
derive_var_extreme_dt()
andderive_var_extreme_dtm()
were updated such that source observations where the date isNA
are excluded (#1419)
admiral 0.8.0
CRAN release: 2022-09-05
New Features
get_summary_records()
creates summary records e.g. derive analysis value (AVAL
) from multiple records, only keeping the derived observations (#525)derive_param_framingham()
adds a Parameter for Framingham Heart Study Cardiovascular Disease 10-Year Risk Score (#977)compute_qual_imputation()
imputes values when qualifier exists in character result (#976)derive_vars_merged_lookup()
maps lookup tables (#940)filter_confirmation()
filters out confirmed observations (#1292) including supporting functionscount_vals()
,min_cond()
, andmax_cond()
.derive_var_confirmation_flag()
derives a flag which depends on other observations of the input dataset (#1293)derive_var_atoxgr()
derives lab toxicity/severity gradeATOXGR
fromATOXGRL
andATOXGRH
.ATOXGRL
holds toxicity/severity grade for low lab values, andATOXGRH
holds toxicity/severity grade for high lab values.derive_var_atoxgr_dir()
derives lab toxicity/severity grade for low lab values (ATOXGRL
) or for high lab values (ATOXGRH
). The grading is created from metadata.New metadata data set called
atoxgr_criteria_ctcv4
which holds criteria for lab grading based on Common Terminology Criteria for Adverse Events (CTCAE) v4.0
Updates of Existing Functions
list_tte_source_objects()
gains apackage
parameter and is now exported (#1212)list_all_templates()
anduse_ad_template()
gain apackage
parameter which can be used to indicate in which package to look for templates (#1205)Randomization Date
RANDDT
variable added to ADSL template and vignette (#1126)Renamed
derive_derived_param()
toderive_param_computed()
and added a deprecation notice (#1229)derive_vars_duration()
updated to not display units when there is missing duration (#1207)value_var
parameter added toderive_vars_atc()
(#1120)format_eoxxstt_default()
- Updated the default value of EOSSTT for screen failure patients (#885)-
The imputation functions (
derive_vars_dtm()
,derive_vars_dt()
,convert_dtc_to_dtm()
,convert_dtc_to_dt()
) have been enhanced to address users feedback (#1300):Partial dates with missing components in the middle like
"2003-12-15T-:15:18"
,"2003-12-15T13:-:19"
,"2020-07--T00:00"
are handled now.-
The control of the level of imputation has been refined by adding the
highest_imputation
argument. For example,highest_imputation = "D"
requests imputation for day and time but not for year and month.(For the
date_imputation
and thetime_imputation
argumentNULL
is no longer a permitted value.) It is now possible to impute completely missing dates by specifying
highest_imputation = "Y"
and themin_dates
ormax_dates
argument.
order
parameter added todthcaus_source()
which allows an additional character vector to be used for sorting thedataset
,derive_vars_dthcaus()
updated to process additional parameter (#1125).create_single_dose_dataset()
Fixed bug whereASTDTM
andAENDTM
were not updated whenstart_date = ASTDT
andend_date = AENDT
. The function has been amended to now requirestart_datetime
andend_datetime
parameters in addition tostart_date
andend_date
.Thekeep_source_vars
has been added to specify the variables to be retained from the source dataset (#1224)
Breaking Changes
Moved all developer-facing functions and vignettes to admiraldev. admiraldev is now a dependency of admiral (#1231)
All ADaM datasets but
admiral_adsl
have been removed from the package (#1234)derive_var_agegr_ema()
andderive_var_agegr_fda()
have been deprecated (#1333)-
Imputation related arguments have been deprecated for all functions except the imputation functions themselves (#1299). I.e., if a derivation like last known alive date is based on dates, DTC variables have to be converted to numeric date or datetime variables in a preprocessing step. For examples see the ADSL vignette.
The following arguments were deprecated:
-
date_imputation
,time_imputation
, andpreserve
indate_source()
The following arguments no longer accept DTC variables:
-
date
indate_source()
,dthcaus_source()
,censor_source()
, andevent_source()
-
dose_date
andanalysis_date
inderive_vars_last_dose()
,derive_var_last_dose_amt()
,derive_var_last_dose_date()
,derive_var_last_dose_grp()
The following functions were deprecated:
derive_vars_merged_dt()
derive_vars_merged_dtm()
-
For the
date_imputation
and thetime_imputation
argument of the imputation functions (derive_vars_dtm()
,derive_vars_dt()
,convert_dtc_to_dtm()
,convert_dtc_to_dt()
)NULL
is no longer a permitted value. The level of imputation can be controlled by thehighest_imputation
argument now.-
The following functions, which were deprecated in previous {admiral} versions, have been removed:
derive_var_disposition_dt()
derive_var_lstalvdt()
lstalvdt_source()
derive_var_trtedtm()
derive_var_trtsdtm()
-
The following functions and parameters, which were deprecated in previous {admiral} versions, are now defunct and will output an ERROR if used:
derive_var_ady()
derive_var_aendy()
derive_var_astdy()
derive_var_atirel()
-
filter
parameter inderive_var_extreme_flag()
andderive_var_worst_flag()
Documentation
New ADMH template script can be accessed using
admiral::use_ad_template("admh")
(#502)New vignette “Higher Order Functions” (#1047)
New vignette “Lab Grading” (#1369)
Fixed
derive_var_disposition_status()
argument to render correctly (#1268)Added link to pharmaverse YouTube channel to README
Various
Restructured Reference page and updated all functions to use
family
tag in roxygen headers for finding similar functions. (#1105)Rename “Articles” page on website to “User Guides” and moved developer vignettes to admiraldev website (#1356)
admiral 0.7.1
CRAN release: 2022-07-18
derive_vars_last_dose()
no longer fails when a variable renamed innew_vars
is supplied to thedose_date
parameter (#1206)derive_vars_duration()
updated to not display units when there is missing duration (#1207)-
derive_param_first_event()
was updated (#1214) such that-
AVAL
is derived instead ofAVALN
and - all variables from the source dataset are kept.
-
create_single_dose_dataset()
Fixed bug where ASTDTM and AENDTM were not updated whenstart_date=ASTDT
andend_date=AENDT
. The function has been amended to now require start_datetime and end_datetime parameters in addition to start_date and end_date.The keep_source_vars has been added to specify the variables to be retained from the source dataset.slice_derivation()
was updated such that it no longer fails if a slice is empty (#1309)
admiral 0.7.0
CRAN release: 2022-05-31
New Features
-
Updates to date/time imputation functions (#761):
convert_date_to_dtm()
andconvert_dtc_to_dtm()
now have time_imputation = “00:00:00” as defaultderive_vars_dt()
now has flag_imputation = “auto” as default
-
New functions for merging variables (#607):
-
derive_vars_merged()
- Merge Variables from a Dataset to the Input Dataset -
derive_vars_merged_dt()
- Merge a (Imputed) Date Variable -
derive_vars_merged_dtm()
- Merge a (Imputed) Datetime Variable -
derive_var_merged_cat()
- Merge a Categorization Variable -
derive_var_merged_exist_flag()
- Merge an Existence Flag -
derive_var_merged_character()
- Merge a Character Variable
-
create_query_data()
is provided to create the queries dataset required as input forderive_vars_query()
(#606)create_single_dose_dataset()
- Derives dataset of single dose from aggregate dose information (#660)-
New functions for deriving first or last dates from multiple source datasets (#753):
-
derive_var_extreme_dtm()
- Derive First or Last Datetime from Multiple Sources -
derive_var_extreme_dt()
- Derive First or Last Date from Multiple Sources
-
New function
derive_extreme_records()
for adding the first or last observation within each by group to the dataset (#1042)New function
derive_param_first_event()
: Add a new parameter for the first event occurring in a dataset. (#1063)New function
derive_param_exist_flag()
: Add a new parameter indicating that a certain event exists in a dataset. (#1064)-
New high order functions (#701):
-
restrict_derivation()
- Execute a derivation on a subset of the input dataset -
slice_derivation()
- The input dataset is split into slices (subsets) and for each slice a derivation is called separately. Some or all arguments of the derivation may vary depending on the slice.
-
filter_relative()
- Selects observations before or after the observation where a specified condition is fulfilled. For example, all observations up to first disease progression. (#1023)
ADLB
New ADLB template script available
ad_adlb.R
, specific ADLB functions developed and BDS Finding vignette has examples enhanced with ADLB functions. (#1122)derive_var_shift()
- Derives a character shift variable containing concatenated shift in values based on user-defined pairing (#944)derive_var_analysis_ratio()
- Derives a ratio variable based on user-supplied variables from a BDS dataset, e.g. ADLB. (#943)derive_param_wbc_abs()
- Adds a parameter for lab differentials converted to absolute values. (#941)
ADPP
- New ADPP template script available
ad_adpp.R
which creates Pharmacokinetics Parameters Analysis Dataset (#850)
Updates of Existing Functions
Datasets internal to the package have been renamed with prefix
admiral_
, e.g.adsl
has been renamed toadmiral_adsl
. Corresponding SDTM datasets in{admiral.test}
have also been renamed, e.g.dm
toadmiral_dm
. These changes will impact examples, vignettes, unit tests and templates (#1108 and #1088)When
derive_vars_dtm_to_tm()
was called for variables created byderive_vars_dtm()
the function failed. This bug was fixed (#1097).impute_dtc()
- Fixed imputation bug. A user settingdate_imputation = MID
andpreserve = FALSE
would expect the date2019---07
to be imputed to2019-06-30
, but the function was returning2019-06-15
. Now returns it correctly. This bug fix also addresses the issue in the downstream functionsderive_vars_dt()
andderive_vars_dtm()
. (#1081)format_eoxxstt_default()
- Updated to have a more meaningful parameter name i.e. the parameter that was x is now status (#911)
Breaking Changes
derive_var_lstalvdt()
has been deprecated in favor ofderive_var_extreme_dt()
(#753).derive_vars_disposition_reason()
now is updated such that the default is populatingDCSREASP
only whenDSDECOD
is equal to'OTHER'
, which is consistent with ADaMIG_v1.3 (#886).derive_vars_suppqual()
has been removed from {admiral} as adding supplementary qualifiers is now done in another package called {metatools} in a function calledcombine_supp()
and is available on CRAN (#950)The
filter
parameter inderive_var_extreme_flag()
andderive_var_worst_flag()
has been deprecated in favor ofrestrict_derivation()
(#701).-
The following functions and parameters, which were deprecated in previous {admiral} versions, have been removed (#1056):
derive_agegr_ema()
derive_agegr_fda()
derive_disposition_dt()
derive_disposition_status()
derive_extreme_flag()
derive_worst_flag()
derive_obs_number()
derive_disposition_reason()
derive_var_basec()
derive_baseline()
derive_params_exposure()
derive_last_dose()
-
dataset
parameter inlstalvdt_source
anddthcaus_source
-
The following functions were deprecated in favor of
derive_vars_dy()
(#1076):-
derive_var_ady()
- Derive Analysis Study Day -
derive_var_aendy()
- Derive Analysis End Relative Day -
derive_var_astdy()
- Derive Analysis Start Relative Day
-
-
The following functions were deprecated in favor of
derive_vars_merged_dtm()
(#1076):-
derive_var_trtedtm()
- Derive Datetime of Last Exposure to Treatment -
derive_var_trtsdtm()
- Derive Datetime of First Exposure to Treatment
-
The
derive_var_disposition_dt()
function was deprecated in favor ofderive_vars_merged_dt()
(#1076)The
derive_var_atirel()
function was deprecated, as it is deemed as too specific for admiral. Derivations like this can be implemented callingmutate()
andcase_when()
.
Documentation
Additional explanation added to
derive_param_*
andderive_derived_param
functions regarding which variables are populated in the additional rows (#939)Updated
derive_var_worst_flag()
andderive_var_extreme_flag()
vignettes to clarify their purpose (#691)Added example of ASEQ derivation in ADCM to OCCDS vignette (#720)
Examples have been added for
format_reason_default()
,format_eoxxstt_default()
,extend_source_datasets()
andfilter_date_sources()
(#745)
Various
- Naming convention of admiral.xxx packages change to admiralxxx from this point onwards (#968)
admiral 0.6.2
Address CRAN comments raised after submitting v0.6.1 (#925)
admiral 0.6.1
Address CRAN comments raised after submitting v0.6.0 (#918)
admiral 0.6.0
New Features
-
derive_vars_dy()
derives the analysis day from one or more--DT(M)
variables (#700)
Updates of Existing Functions
The
derive_last_dose()
function has been split into a general functionderive_vars_last_dose()
and three wrapper functionsderive_var_last_dose_amt()
,derive_var_last_dose_date()
, andderive_var_last_dose_grp()
(#385)derive_var_ontrtfl()
now has anew_var
parameter to support the derivation ofONTRxxFL
andONTRTwFL
variables (#721)derive_vars_dtm()
,derive_var_disposition
andderive_var_lstalvdt
now havepreserve
argument. A user can preserve partial dates when doing date imputation, e.g.2019---07
would become2019-06-07
by settingpreserve
toTRUE
when doing date_imputation (#592)derive_vars_dtm()
now hasignore_seconds_flag
argument so users can suppress"S"
flag if seconds are not recorded in the data (#589)
Breaking Changes
derive_agegr_ema()
,derive_agegr_fda()
,derive_disposition_dt()
,derive_disposition_status()
,derive_extreme_flag()
,derive_worst_flag()
,derive_obs_number()
,derive_disposition_reason()
have been deprecated and renamed in favor ofderive_var_agegr_ema()
,derive_var_agegr_fda()
,derive_var_disposition_dt()
,derive_var_disposition_status()
,derive_var_extreme_flag()
,derive_var_worst_flag()
,derive_var_last_dose()
,derive_var_obs_number()
, andderive_vars_disposition_reason()
respectively (#738)derive_var_basec()
andderive_baseline()
have been deprecated in favor of the extendedderive_var_base()
function (#695)derive_params_exposure()
has been deprecated and renamed asderive_param_exposure()
(#722)The
derive_last_dose()
function has been deprecated in favor ofderive_var_last_dose_date()
(#385)The behavior of all functions providing the
date_imputation
parameter, e.g.,derive_vars_dtm()
andderive_vars_dt()
, has changed fordate_imputation = "mid"
. Before the date was imputed as June 15th if both month and day were missing. Now it is imputed as June 30th. For the old behavior please specifydate_imputation = "06-15"
. Please note the behavior has not changed if only the day is missing. In this case the day is imputed as15
(#592)derive_var_ontrtfl()
now has anew_var
parameter to support the derivation ofONTRxxFL
andONTRTwFL
variables (#721)-
The following functions and parameters, which were deprecated in previous {admiral} versions, were removed (#513):
-
derive_aage()
,derive_duration()
,derive_query_vars()
, andderive_suppqual_vars()
function -
fns
andfilter_rows
parameters inderive_summary_records()
-
date_var
andtraceabilty_vars
parameters indthcaus_source()
-
flag_filter
parameter inderive_extreme_flag()
-
flag_filter
parameter inderive_var_extreme_flag()
-
date_var
parameter inlstalvdt_source()
-
date
parameter inderive_var_ontrtfl()
-
derive_var_agegr_fda()
has been updated to use ranges <18, 18-64, >=65 (#829)
Documentation
README and site homepage has been updated with important new section around expectations of {admiral}, as well as other useful references such as links to conference talks (#868 & #802)
New vignette Development Process and improvements made to contribution vignettes (#765 & #758)
Updated Pull Request Review Guidance on using
task-list-completed
workflow (#817)
admiral 0.5.0
The first truly open source release licensed under Apache 2.0 (#680)
New vignette Contributing to admiral (#679)
New vignette Unit Test Guidance (#679)
Broken links in README have been fixed (#564)
admiral 0.4.0
New Features
General
derive_vars_dtm_to_tm()
enables the easy conversion of datetime to time variables (#551)derive_var_age_years()
derives age in years from a variable providing the age in different units (#569)
BDS
derive_param_tte()
derives time-to-event-parameters (#546)For common time-to-event endpoints event and censoring source objects are provided (#612)
Developer
assert_list_element()
checks if an element of a list of lists/classes fulfills a conditionassert_one_to_one()
checks if there is a one to one mapping between two lists of variablesnegate_vars()
negates a list of variables to remove them from a dataset withselect()
Breaking Changes
All SDTM datasets have been moved to the {admiral.test} package (#639)
The
min_dates
andmax_dates
parameters ofderive_vars_dt()
andderive_vars_dtm()
no longer expect alist()
butvars()
as input (#405)
Bug Fixes
derive_vars_dtm()
no longer shifts the time of the input--DTC
variable (#436)derive_vars_dtm()
Change the min_dates with max_dates in thelapply
statement when computing max_dates (#687)
Documentation
New vignette Creating a BDS Time-to-Event ADaM (#549)
New vignette Queries Dataset Documentation (#561)
New vignette Writing Vignettes (#334)
New vignette Pull Request Review Guidance (#554)
A section on handling missing values when working with {admiral} has been added to the “Get Started” vignette (#577)
Package installation instructions have been added to the README (#558)
The documentation of
derive_vars_dtm()
falsely stated that theflag_imputation
parameter should be eitherTRUE
orFALSE
. It now correctly states that the possible values are"time"
,"date"
or"auto"
(#539)
admiral 0.3.0
New Features
General
convert_blanks_to_na()
can be used to convert SAS blanks, i.e.""
, into proper RNA
values (#482)call_derivation()
enables users to call the same function multiple times with some parameters being fixed across iterations and others varying (#403)derive_vars_dtm_to_dt()
enables the easy conversion of datetime to date variables (#376)derive_var_ontrtfl()
can now handle events with a start and end date rather than just a single assessment date (#395)derive_worst_flag()
enables the flagging of worst records (#300)
BDS
derive_derived_param()
can be used to derive a new parameter from existing parameters in a BDS dataset (#325)derive_param_bmi()
,derive_param_bsa()
andderive_param_map()
enables the derivation of the body mass index, body surface area and mean arterial pressure parameters respectively (#368)derive_param_qtc()
enables the derivation of corrected QT intervals according to the formula of Bazett, Fridericia or Sagie (#325)derive_param_rr()
enables the derivation of the RR interval (#325)derive_params_exposure()
enables the derivation of summary exposure parameters (#400)derive_param_doseint()
enables the derivation of dose intensity (#179)
OCCDS
derive_var_atirel()
enables the derivation of the “Analysis Time Relative to Reference” (#397)derive_vars_atc()
can be used to add ATC variables from FACM to ADCM (#396)
Updates of Existing Functions
derive_var_anrind()
now checks whether theAVAL
variable is present in the input dataset (#486)All derivation functions check whether the input dataset is grouped and throw an error if it is (#408)
use_ad_template()
has been refactored to no longer make use of the {usethis} package which is no longer a dependency of {admiral} (#433)A performance issue in
derive_vars_dt()
has been resolved (#384)
Breaking Changes
The
drop_values_from
parameter has been removed fromderive_summary_records()
(#425)The format of the
date_imputation
parameter ofderive_vars_dt()
andderive_vars_dtm()
has been changed from “dd-mm” to “mm-dd”. Thus, “01-12” now refers to January 12th rather than December 1st (#492)-
Several functions have been renamed. The old names are now deprecated. They can still be used but a warning will be issued (#507)
-
derive_aage()
->derive_vars_aage()
-
derive_duration()
->derive_vars_duration()
-
derive_query_vars()
->derive_vars_query()
-
derive_suppqual_vars()
->derive_vars_suppqual()
-
The
date_var
parameter oflstalvdt_source()
has been renamed todate
The
filter_rows
parameter ofderive_summary_records()
has been renamed tofilter
. Thefns
parameter has been deprecated in favor ofanalysis_var
andsummary_fun
(#491)The
date_var
andtraceabilty_vars
parameters ofdthcaus_source()
have been renamed todate
andtraceability_vars
, respectively (#493)The
flag_filter
parameter ofderive_extreme_flag()
has been renamed tofilter
(#487)
Bug Fixes
-
derive_agegr_fda()
used to returnNA
for ages less than or equal 18. It now returns<=18
(#441)
Documentation
New vignette on “Date and Time Imputation” has been created (#198)
A “Guidance for git Usage” has been created (#266)
“OCCDS” has been added as a new section on the reference page on the package website (#485)
The Programming Strategy has been updated (#495)
A search feature has been added to the package website (#438)
New template scripts for ADEX (#181), ADCM (#268) and ADEG (#258) have been created
New vignette for programming ADEX has been created (#372)
A section on how to create query variables (e.g. SMQs in ADAE) has been added to the Occurrence datasets vignette (#370)
The BDS vignette has been updated to incorporate examples of ADVS and ADEG specific functions (#371)
admiral 0.2.1
- Fixed a critical bug in
use_ad_template()
that prevented the function from being usable at all (#326)
admiral 0.2.0
New Features
General
Function argument checks have been completely re-written to provide clearer error messages to users (#263, #288)
SDTM
SUPP--
datasets can be merged onto their parent domain usingderive_suppqual_vars()
(#145)In case a derivation detects duplicate records after applying a
filter
, the dataset of duplicate records is made available to users viaget_duplicates_dataset()
(#202)derive_vars_dt()
andderive_vars_dtm()
gain amin_dates
andmax_dates
parameter which can be used to ensure that the imputed date(time) is not before themin_dates
nor after themax_dates
, e.g. avoid thatAENDT
is after the data cut date orASTDT
is before the first treatment date (#158)use_ad_template()
can be used to open a template script for an ADaM dataset; all available templates can be displayed usinglist_all_templates()
(#110)
ADSL
EMA and FDA defined age groupings can be derived using
derive_agegr_ema()
andderive_agegr_fda()
, respectivelyDisposition Status can be derived using
derive_disposition_status()
(#92)Disposition Reason can be derived using
derive_disposition_reason()
Disposition Dates can be derived using
derive_disposition_dt()
(#91)Date Last Known Alive can be derived using
derive_var_lstalvdt()
(#94)Cause of Death can be derived using
derive_var_dthcaus()
(#93)
BDS
- Summary records for BDS datasets, e.g. with
DTYPE == "AVERAGE"
, can be derived usingderive_summary_records()
(#177)
Breaking Changes
derive_merged_vars()
has been removed from {admiral} in favor of smaller special purpose functions, e.g.derive_disposition_status()
(#167)-
Function arguments no longer accept expressions created with
expr()
orexprs()
as inputs; instead filter expressions can be passed “as is” and multiple variables have to be wrapped insidevars()
(#187)Old:
derive_extreme_flag( vs, new_var = LASTFL, by_vars = exprs(USUBJID, VSTESTCD, VISIT), order = exprs(VSTPTNUM), mode = "last", flag_filter = expr(VISIT != "BASELINE") )
New:
read_dap_m3()
andinitialize()
have been migrated to {admiral.roche} (#272)The
start_date
andend_date
parameters ofderive_var_ady()
,derive_var_aendy()
andderive_var_astdy()
have been renamed toreference_date
anddate
, respectively (#121)
Bug Fixes
derive_var_basetype()
no longer drops records which do not match any condition defined in thebasetype
argument (#226)Join warnings like “Column
USUBJID
has different attributes on LHS and RHS of join when using left_join()” are no longer displayed (#271)For datetimes with time imputed to “00:00:00” the time part is now displayed (#206)