Releases: pharmaverse/admiral
admiral 0.8.0
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()
, and
max_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()
, and
event_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
admiral 0.7.1
-
derive_vars_last_dose()
no longer fails when a variable renamed in new_vars is supplied to the dose_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 of AVALN and
- all variables from the source dataset are kept
-
slice_derivation()
was updated such that it no longer fails if a slice is empty (#1309)
admiral 0.7.0
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 default -
derive_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 Datasetderive_vars_merged_dt()
- Merge a (Imputed) Date Variablederive_vars_merged_dtm()
- Merge a (Imputed) Datetime Variablederive_var_merged_cat()
- Merge a Categorization Variablederive_var_merged_exist_flag()
- Merge an Existence Flagderive_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 Sourcesderive_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 datasetslice_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 by
derive_vars_dtm()
the function failed. This bug was fixed (#1097). -
impute_dtc()
- Fixed imputation bug. A user settingdate_imputation = MID
and
preserve = 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()
and
derive_var_worst_flag()
has been deprecated in favor of
restrict_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 Dayderive_var_aendy()
- Derive Analysis End Relative Dayderive_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 Treatmentderive_var_trtsdtm()
- Derive Datetime of First Exposure to Treatment
-
The
derive_var_disposition_dt()
function was deprecated in favor of
derive_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 calling
mutate()
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)
First CRAN Release
#947 Address CRAN comments * Split dev and user utilities * Ignore man pages of dev utils when building pkg * Don't generate Rd files for assertthat predicates * Move assertthat checks to separate file * Ensure docs have a `\value` field * Remove example * Remove 'Collate' field * Add reference to description * Add return value to documentation * Bump version * Update NEWS * Add missing period * Remove unused functions * Remove `is_vars()` * Fix typos * Fix typos * Optionally check if `dataset` is grouped * Address lint line length issue
First CRAN Submission
Merge pull request #897 from pharmaverse/devel Release v0.6.0
First Open Source Release
v0.5.0 Release v0.5.0
PHUSE EU Connect 2021 Workshop
v0.4.0 Release v0.4.0
External Testing
v0.3.0 Create v0.3.0 of admiral
Demo #3 (addendum)
Admiral package and admiral presentation for demo #3 on July, 8/9 2021.
Demo #3
Merge pull request #322 from Roche-GSK/devel Version 0.2.0 addendum