Package 'adepro'

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

Help Index


Obtains date as number

Description

Obtains date as number

Usage

as_numeric_date(variable)

Arguments

variable

A vector, the variable


Impute missing values in adverse event data and return number of imputed data

Description

Impute missing values in adverse event data and return number of imputed data

Usage

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
)

Arguments

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

Value

data frame with imputed adverse event data


Calculate the Number of Cases when Adverse Event Start Day is after the Adverse Event End Day

Description

Calculate the Number of Cases when Adverse Event Start Day is after the Adverse Event End Day

Usage

calculate_number_ae_end_is_earlier_than_start(dat, sel_aestdy, sel_aeendy)

Arguments

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

Value

numeric value with the number of adverse event end day smaller start day


Calculate the Number of Adverse Events End Day Missing

Description

Calculate the Number of Adverse Events End Day Missing

Usage

calculate_number_ae_end_missing(dat, sel_aeendy, sel_aedecod, sel_aestdy)

Arguments

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

Value

numeric value with the number missing adverse event end days


Calculate the Number of Adverse Events Start Day Missing

Description

Calculate the Number of Adverse Events Start Day Missing

Usage

calculate_number_ae_start_missing(dat, sel_aestdy, sel_aedecod, sel_aeendy)

Arguments

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'

Value

numeric value with the number missing adverse event start days


Calculate the Number of Adverse Events Removed due to Missing Treatment Emergency Flag

Description

Calculate the Number of Adverse Events Removed due to Missing Treatment Emergency Flag

Usage

calculate_number_aes_not_treatment_emergent(dat, sel_aedecod, sel_aetrtemn)

Arguments

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

Value

numeric value with the number missing treatment emergency values


Calculate the Number of Missing Last Visit Dates

Description

Calculate the Number of Missing Last Visit Dates

Usage

calculate_number_missing_last_visit_dates(dat, sel_lvdt, sel_subjidn)

Arguments

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

Value

numeric value with the number missing last visit dates


Calculate the Number of Missing Severity Grades

Description

Calculate the Number of Missing Severity Grades

Usage

calculate_number_missing_severity_flag(
  dat,
  sel_aesevn = NULL,
  sel_aedecod,
  severity_grading_flag
)

Arguments

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

Value

numeric value with the number missing grades


Calculate the Number of Unknown Adverse Events

Description

Calculate the Number of Unknown Adverse Events

Usage

calculate_number_unknown_aes(dat, sel_aedecod, sel_aestdy, sel_aeendy)

Arguments

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

Value

numeric value with the number empty adverse events ("")


Checks if column name exists, throw an error otherwise

Description

Checks if column name exists, throw an error otherwise

Usage

check_colname_present(colname, data)

Arguments

colname

A character, the column name to check

data

A data object


Filter for Safety Flag and Create Required Variables

Description

Filter for Safety Flag and Create Required Variables

Usage

filter_for_safety_flag(dat, SAFFN)

Arguments

dat

frame with adverse event data set

SAFFN

Safety Flag as numeric (required)

Value

data frame with filtered adverse event data


Filter for Safety Flag and Create Required Variables

Description

Filter for Safety Flag and Create Required Variables

Usage

filter_prepare_patient_data(data, saffn, lvdt, trtsdt, trt01a, subjidn, dthdt)

Arguments

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)

Value

data frame with filtered adverse event data


Get number of unknown AEs

Description

Get number of unknown AEs

Usage

get_number_of_unknown_aes(data, adae_data, adsl_data, sel_aedecod)

Arguments

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)


Checks if variable can be converted to date

Description

Returns TRUE if at least a value can be parsed to date with anytime::anydate

Usage

is_convertible_to_date(variable)

Arguments

variable

A vector, the variable


Join Adverse Event Data and Subject Level Data Sets

Description

Join Adverse Event Data and Subject Level Data Sets

Usage

join_adae_and_adsl(dat_adae, dat_adsl, SUBJIDN)

Arguments

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)

Value

merged data set with adae and adsl information


Launches the AdEPro application

Description

Launches the AdEPro application

Usage

run_app(
  onStart = NULL,
  options = list(),
  enableBookmarking = NULL,
  uiPattern = "/",
  ...
)

Arguments

onStart

A function that will be called before the app is actually run. This is only needed for shinyAppObj, since in the shinyAppDir case, a global.R file can be used for this purpose.

options

Named options that should be passed to the runApp call (these can be any of the following: "port", "launch.browser", "host", "quiet", "display.mode" and "test.mode"). You can also specify width and height parameters which provide a hint to the embedding environment about the ideal height/width for the app.

enableBookmarking

Can be one of "url", "server", or "disable". The default value, NULL, will respect the setting from any previous calls to enableBookmarking(). See enableBookmarking() for more information on bookmarking your app.

uiPattern

A regular expression that will be applied to each GET request to determine whether the ui should be used to handle the request. Note that the entire request path must match the regular expression in order for the match to be considered successful.

...

arguments to pass to golem_opts. See '?golem::get_golem_options' for more details.

Details

Further information on how to use this application can be found in the vignette of this package.

Value

A shiny app

Examples

## 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)