| Title: | A 'shiny' Application for the (Audio-)Visualization of Adverse Event Profiles |
|---|---|
| Description: | Contains a 'shiny' application called AdEPro (Animation of Adverse Event Profiles) which (audio-)visualizes adverse events occurring in clinical trials. As this data is usually considered sensitive, this tool is provided as a stand-alone application that can be launched from any local machine on which the data is stored. |
| Authors: | Nicole Rethemeier [cre], Christoph Tasto [aut], Steffen Jeske [aut], Bodo Kirsch [aut] |
| Maintainer: | Nicole Rethemeier <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 4.4.1 |
| Built: | 2026-05-12 08:37:34 UTC |
| Source: | https://github.com/bayer-group/bic-adepro |
Obtains date as number
as_numeric_date(variable)as_numeric_date(variable)
variable |
A vector, the variable |
Impute missing values in adverse event data and return number of imputed data
calculate_and_impute_required_variables_missing_values( data, SUBJIDN = "SUBJIDN", LVDT = "LVDT", DTHDT = "DTHDT", TRTSDT = "TRTSDT", AEDECOD = "AEDECOD", AESTDY = "AESTDY", AETRTEMN = "AETRTEMN", AEENDY = "AEENDY", AESEVN = "AESEVN", severity_grading_flag )calculate_and_impute_required_variables_missing_values( data, SUBJIDN = "SUBJIDN", LVDT = "LVDT", DTHDT = "DTHDT", TRTSDT = "TRTSDT", AEDECOD = "AEDECOD", AESTDY = "AESTDY", AETRTEMN = "AETRTEMN", AEENDY = "AEENDY", AESEVN = "AESEVN", severity_grading_flag )
data |
frame with adverse event data set |
SUBJIDN |
Subject ID |
LVDT |
Last Visit Date as numeric (required) |
DTHDT |
Death Date as numeric (required) |
TRTSDT |
Treatment Start Date as numeric (required) |
AEDECOD |
Adverse Event Code as character (required) |
AESTDY |
Adverse Event Start Date as numeric (required) |
AETRTEMN |
Adverse Event Treatment Emergency Flag as numeric (required) |
AEENDY |
Adverse Event End date as numeric (required) |
AESEVN |
Adverse Event Severity Grade Flag as numeric (required) |
severity_grading_flag |
character value if 3 or 5 step grading is used |
data frame with imputed adverse event data
Calculate the Number of Cases when Adverse Event Start Day is after the Adverse Event End Day
calculate_number_ae_end_is_earlier_than_start(dat, sel_aestdy, sel_aeendy)calculate_number_ae_end_is_earlier_than_start(dat, sel_aestdy, sel_aeendy)
dat |
data frame with adverse event data |
sel_aestdy |
character with adverse event start day variable name |
sel_aeendy |
character with adverse event end day variable name |
numeric value with the number of adverse event end day smaller start day
Calculate the Number of Adverse Events End Day Missing
calculate_number_ae_end_missing(dat, sel_aeendy, sel_aedecod, sel_aestdy)calculate_number_ae_end_missing(dat, sel_aeendy, sel_aedecod, sel_aestdy)
dat |
data frame with adverse event data |
sel_aeendy |
character with adverse event end day variable name |
sel_aedecod |
character with adverse event code variable name |
sel_aestdy |
character with adverse event start day variable name |
numeric value with the number missing adverse event end days
Calculate the Number of Adverse Events Start Day Missing
calculate_number_ae_start_missing(dat, sel_aestdy, sel_aedecod, sel_aeendy)calculate_number_ae_start_missing(dat, sel_aestdy, sel_aedecod, sel_aeendy)
dat |
data frame with adverse event data |
sel_aestdy |
character with adverse event start day variable name |
sel_aedecod |
character with adverse event name |
sel_aeendy |
character with adverse event end day variable name' |
numeric value with the number missing adverse event start days
Calculate the Number of Adverse Events Removed due to Missing Treatment Emergency Flag
calculate_number_aes_not_treatment_emergent(dat, sel_aedecod, sel_aetrtemn)calculate_number_aes_not_treatment_emergent(dat, sel_aedecod, sel_aetrtemn)
dat |
data frame with adverse event data |
sel_aedecod |
character with adverse event code variable name |
sel_aetrtemn |
character with adverse event treatment emergency variable name |
numeric value with the number missing treatment emergency values
Calculate the Number of Missing Last Visit Dates
calculate_number_missing_last_visit_dates(dat, sel_lvdt, sel_subjidn)calculate_number_missing_last_visit_dates(dat, sel_lvdt, sel_subjidn)
dat |
data frame with adverse event data |
sel_lvdt |
character with variable name of last visit date in data |
sel_subjidn |
character with variable name of subject id |
numeric value with the number missing last visit dates
Calculate the Number of Missing Severity Grades
calculate_number_missing_severity_flag( dat, sel_aesevn = NULL, sel_aedecod, severity_grading_flag )calculate_number_missing_severity_flag( dat, sel_aesevn = NULL, sel_aedecod, severity_grading_flag )
dat |
data frame with adverse event data |
sel_aesevn |
character with severity grade variable name |
sel_aedecod |
character with adverse event code variable name |
severity_grading_flag |
logical value if 3 or 5 step grading is used |
numeric value with the number missing grades
Calculate the Number of Unknown Adverse Events
calculate_number_unknown_aes(dat, sel_aedecod, sel_aestdy, sel_aeendy)calculate_number_unknown_aes(dat, sel_aedecod, sel_aestdy, sel_aeendy)
dat |
data frame with adverse event data |
sel_aedecod |
character with adverse event code variable name |
sel_aestdy |
character with adverse event start day variable name |
sel_aeendy |
character with adverse event end day variable name |
numeric value with the number empty adverse events ("")
Checks if column name exists, throw an error otherwise
check_colname_present(colname, data)check_colname_present(colname, data)
colname |
A character, the column name to check |
data |
A data object |
Filter for Safety Flag and Create Required Variables
filter_for_safety_flag(dat, SAFFN)filter_for_safety_flag(dat, SAFFN)
dat |
frame with adverse event data set |
SAFFN |
Safety Flag as numeric (required) |
data frame with filtered adverse event data
Filter for Safety Flag and Create Required Variables
filter_prepare_patient_data(data, saffn, lvdt, trtsdt, trt01a, subjidn, dthdt)filter_prepare_patient_data(data, saffn, lvdt, trtsdt, trt01a, subjidn, dthdt)
data |
frame with adverse event data set |
saffn |
Safety Flag as numeric (required) |
lvdt |
Last Visit Date as numeric (required) |
trtsdt |
Treatment Start Date as numeric (required) |
trt01a |
Treatment Group as character (required) |
subjidn |
Subject Id as numeric (required) |
dthdt |
Death Date as numeric (required) |
data frame with filtered adverse event data
Get number of unknown AEs
get_number_of_unknown_aes(data, adae_data, adsl_data, sel_aedecod)get_number_of_unknown_aes(data, adae_data, adsl_data, sel_aedecod)
data |
A dataframe |
adae_data |
A dataframe. ADAE data |
adsl_data |
A dataframe. ADSL data |
sel_aedecod |
Character vector with names of selected AEs (AEDECOD) |
Returns TRUE if at least a value can be parsed to date with anytime::anydate
is_convertible_to_date(variable)is_convertible_to_date(variable)
variable |
A vector, the variable |
Join Adverse Event Data and Subject Level Data Sets
join_adae_and_adsl(dat_adae, dat_adsl, SUBJIDN)join_adae_and_adsl(dat_adae, dat_adsl, SUBJIDN)
dat_adae |
data frame with adverse event data set |
dat_adsl |
data frame with subject level data set |
SUBJIDN |
character with subject identifier variable (required column in both data sets) |
merged data set with adae and adsl information
Launches the AdEPro application
run_app( onStart = NULL, options = list(), enableBookmarking = NULL, uiPattern = "/", ... )run_app( onStart = NULL, options = list(), enableBookmarking = NULL, uiPattern = "/", ... )
onStart |
A function that will be called before the app is actually run.
This is only needed for |
options |
Named options that should be passed to the |
enableBookmarking |
Can be one of |
uiPattern |
A regular expression that will be applied to each |
... |
arguments to pass to golem_opts. See '?golem::get_golem_options' for more details. |
Further information on how to use this application can be found in the vignette of this package.
A shiny app
## Not run: ## Launch application on localhost (127.0.0.1) ## ------------------------------------------- ## By default run_app starts the application on localhost ## and a randomly selected port (e.g. 9876), in which case you can connect ## to the running application by navigating your browser to ## http://localhost:9876. run_app() ## Launch application on a different host ## -------------------------------------- ## You can also run the application on a different host ## by specifying a hostname and port. Just make sure to ## use an open port on your machine. Here "open" means ## that the port should not be used by another service ## and the port is opened by your firewall. options(shiny.port = 8888, shiny.host = "your-hostname") run_app(host="your-hostname", port=8888) ## Make the application available to your coworkers ## ------------------------------------------------ ## within your local area network even without a ## dedicated Shiny server. The value set through the ## host argument says to accept any connection (not just from localhost). ## Then take note of your local IP (if you are under linux, ## you can see it through ifconfig). Say your IP is 192.168.1.70. ## Your colleagues can use your app by inserting in the address ## bar of their browser 192.168.1.70:8888, i.e. your IP followed ## by : and the port number you selected. options(shiny.port = 8888, shiny.host = "0.0.0.0") run_app() ## Launch application on a different browser ## ---------------------------------------- ## To run the shiny app on a different browser than your standard browser ## use the "browser" argument to set the path to the respective .exe file. option(browser = "C:/Program Files/Mozilla Firefox/firefox.exe") run_app() ## launching the application. ## End(Not run)## Not run: ## Launch application on localhost (127.0.0.1) ## ------------------------------------------- ## By default run_app starts the application on localhost ## and a randomly selected port (e.g. 9876), in which case you can connect ## to the running application by navigating your browser to ## http://localhost:9876. run_app() ## Launch application on a different host ## -------------------------------------- ## You can also run the application on a different host ## by specifying a hostname and port. Just make sure to ## use an open port on your machine. Here "open" means ## that the port should not be used by another service ## and the port is opened by your firewall. options(shiny.port = 8888, shiny.host = "your-hostname") run_app(host="your-hostname", port=8888) ## Make the application available to your coworkers ## ------------------------------------------------ ## within your local area network even without a ## dedicated Shiny server. The value set through the ## host argument says to accept any connection (not just from localhost). ## Then take note of your local IP (if you are under linux, ## you can see it through ifconfig). Say your IP is 192.168.1.70. ## Your colleagues can use your app by inserting in the address ## bar of their browser 192.168.1.70:8888, i.e. your IP followed ## by : and the port number you selected. options(shiny.port = 8888, shiny.host = "0.0.0.0") run_app() ## Launch application on a different browser ## ---------------------------------------- ## To run the shiny app on a different browser than your standard browser ## use the "browser" argument to set the path to the respective .exe file. option(browser = "C:/Program Files/Mozilla Firefox/firefox.exe") run_app() ## launching the application. ## End(Not run)