add_filter: Add a New Filter Definition

View source: R/filters.R

add_filterR Documentation

Add a New Filter Definition

Description

Add a new filter definition or overwrite an existing one

Usage

add_filter(
  id,
  title,
  target,
  condition,
  character_only = FALSE,
  overwrite = FALSE
)

Arguments

id

character The id or name of this filter, e.g. "SE".

title

character The title of the filter

target

character The target dataset of the filter

condition

The filter condition

character_only

logical. Is condition a string? Defaults to FALSE.

overwrite

logical Should existing filters be overwritten? Defaults to FALSE.

Value

The function returns a list of title, target and condition invisibly

Author(s)

Thomas Neitmann (neitmant)

Examples

add_filter(
  id = "CTC5",
  title = "Grade 5 Adverse Event",
  target = "ADAE",
  condition = AETOXGR == "5"
)

add_filter(
  id = "CTC4",
  title = "Grade 4 Adverse Event",
  target = "ADAE",
  condition = "AETOXGR == '4'",
  character_only = TRUE
)

add_filter(
  id = "IT",
  title = "ITT Population",
  target = "ADSL",
  condition = ITTFL == "Y",
  overwrite = TRUE
)

add_filter(
  id = "5PER",
  title = "Adverse Events with a Difference of at Least 5% between Treatment Arms",
  target = "adae",
  condition = 1 == 1,
  overwrite = TRUE
)


filters documentation built on May 29, 2024, 8:29 a.m.