format_eoxxstt_default {admiral}R Documentation

Default Format for Disposition Status

Description

Define a function to map the disposition status. To be used as an input for derive_var_disposition_status().

Usage

format_eoxxstt_default(status)

Arguments

status

the disposition variable used for the mapping (e.g. DSDECOD).

Details

Usually this function can not be used with ⁠%>%⁠.

Value

A character vector derived based on the values given in status: "NOT STARTED" if status is "SCREEN FAILURE" or "SCREENING NOT COMPLETED", "COMPLETED" if status is "COMPLETED", "DISCONTINUED" if status is not in ("COMPLETED","SCREEN FAILURE", "SCREENING NOT COMPLETED") nor NA, "ONGOING" otherwise.

Author(s)

Samia Kabi

See Also

derive_var_disposition_status()

Utilities for Formatting Observations: convert_blanks_to_na(), format_reason_default(), yn_to_numeric()

Examples

library(dplyr, warn.conflicts = FALSE)
library(admiral.test)
data("admiral_dm")
data("admiral_ds")

admiral_dm %>%
  derive_var_disposition_status(
    dataset_ds = admiral_ds,
    new_var = EOSSTT,
    status_var = DSDECOD,
    format_new_var = format_eoxxstt_default,
    filter_ds = DSCAT == "DISPOSITION EVENT"
  ) %>%
  select(STUDYID, USUBJID, EOSSTT)

[Package admiral version 0.8.4 Index]