Skip to contents

Shift Tables show the progression of change from the baseline, with the progression often being along time; the number of subjects is displayed in different range (e.g. low, normal, or high) at baseline and at selected time points or intervals.

Usage

build_shift_table(
  adsl,
  bds_df,
  filter_cond = NULL,
  trt_var,
  trt_label = NULL,
  group_var = NULL,
  group_label = NULL,
  default_view = TRUE
)

Arguments

adsl

(data.frame)
adsl data frame.

bds_df

(data.frame)
bds data frame eg. adlb, advs.

filter_cond

(character)
Filtering condition required for bds_df.

trt_var

(character)
Name of the treatment variable from adsl for treatment count, eg. ARM. Must be a vector of length 1.

trt_label

(named vector of character)
Label of trt_var. Must be a named vector of length 1.

group_var

(vector of characters)
Names of variables for grouping in addition to parameter. Default is NULL.

group_label

(named vector of characters)
Label of group_var.

default_view

(logical)
If TRUE (default), values of trt_var are shown in rows, else in columns.

Value

A Flextable object of the Shift Table

Examples

adsl <- pharmaverseadam::adsl |> drop_missing_cols()
#> Error in loadNamespace(x): there is no package called 'pharmaverseadam'
adlb <- pharmaverseadam::adlb |> drop_missing_cols()
#> Error in loadNamespace(x): there is no package called 'pharmaverseadam'

if (FALSE) { # \dontrun{
build_shift_table(
  adsl = adsl,
  bds_df = adlb,
  filter_cond = NULL,
  trt_var = "ARM",
  trt_label = c(ARM = "Description of Planned Arm"),
  group_var = NULL, ,
  default_view = FALSE
)
} # }