TL Catalog
  1. Listings
  2. Disposition of Subjects
  3. LSIDS03
  • Introduction

  • Index

  • Tables
    • Adverse Events
      • TSFAE01A
      • TSFAE01B
      • TSFAE02
      • TSFAE02A
      • TSFAE03
      • TSFAE03A
      • TSFAE04
      • TSFAE04A
      • TSFAE05
      • TSFAE05A
      • TSFAE06A
      • TSFAE06B
      • TSFAE07A
      • TSFAE07B
      • TSFAE08
      • TSFAE09
      • TSFAE10
      • TSFAE11
      • TSFAE12
      • TSFAE13
      • TSFAE14
      • TSFAE15
      • TSFAE16
      • TSFAE17A
      • TSFAE17B
      • TSFAE17C
      • TSFAE17D
      • TSFAE19A
      • TSFAE19B
      • TSFAE19C
      • TSFAE19D
      • TSFAE20A
      • TSFAE20B
      • TSFAE20C
      • TSFAE21A
      • TSFAE21B
      • TSFAE21C
      • TSFAE21D
      • TSFAE22A
      • TSFAE22B
      • TSFAE22C
      • TSFAE23A
      • TSFAE23B
      • TSFAE23C
      • TSFAE23D
      • TSFAE24A
      • TSFAE24B
      • TSFAE24C
      • TSFAE24D
      • TSFAE24F
      • TSFDTH01
    • Clinical Laboratory Evaluation
      • TSFLAB01
      • TSFLAB01A
      • TSFLAB02
      • TSFLAB02A
      • TSFLAB02B
      • TSFLAB03
      • TSFLAB03A
      • TSFLAB04A
      • TSFLAB04B
      • TSFLAB05
      • TSFLAB06
      • TSFLAB07
    • Demographic
      • TSIDEM01
      • TSIDEM02
      • TSIMH01
    • Disposition of Subjects
      • TSIDS01
      • TSIDS02
      • TSIDS02A
    • Electrocardiograms
      • TSFECG01
      • TSFECG01A
      • TSFECG02
      • TSFECG03
      • TSFECG04
      • TSFECG05
    • Exposure
      • TSIEX01
      • TSIEX02
      • TSIEX03
      • TSIEX04
      • TSIEX06
      • TSIEX07
      • TSIEX08
      • TSIEX09
      • TSIEX10
      • TSIEX11
    • Pharmacokinetics
      • TPK01A
      • TPK01B
      • TPK02
      • TPK03
    • Prior and Concomitant Therapies
      • TSICM01
      • TSICM02
      • TSICM03
      • TSICM04
      • TSICM05
      • TSICM06
      • TSICM07
      • TSICM08
    • Vital Signs and Physical Findings
      • TSFVIT01
      • TSFVIT01A
      • TSFVIT02
      • TSFVIT03
      • TSFVIT04
      • TSFVIT05
      • TSFVIT06
  • Listings
    • Adverse Events
      • LSFAE01
      • LSFAE02
      • LSFAE03
      • LSFAE04
      • LSFAE05
      • LSFAE06A
      • LSFAE06B
      • LSFDTH01
    • Clinical Laboratory Evaluation
      • LSFLAB01
    • Demographic
      • LSIDEM01
      • LSIDEM02
      • LSIMH01
    • Disposition of Subjects
      • LSIDS01
      • LSIDS02
      • LSIDS03
      • LSIDS04
      • LSIDS05
    • Electrocardiograms
      • LSFECG01
      • LSFECG02
    • Exposure
      • LSIEX01
      • LSIEX02
      • LSIEX03
    • Prior and Concomitant Therapies
      • LSICM01
    • Vital Signs and Physical Findings
      • LSFVIT01
      • LSFVIT02

  • Reproducibility

  • Changelog

On this page

  • Output
  • Edit this page
  • Report an issue
  1. Listings
  2. Disposition of Subjects
  3. LSIDS03

LSIDS03

Listing of Subjects Who Were Unblinded During the Study


Output

  • Preview
Code
# Program Name:              lsids03.R

# Prep environment

library(envsetup)
library(tern)
library(dplyr)
library(rtables)
library(rlistings)
library(junco)
library(stringi)

# Define script level parameters

tblid <- "LSIDS03"
fileid <- tblid
popfl <- "SAFFL"
trtvar <- "TRT01P"
key_cols <- c("COL0", "COL1")
disp_cols <- paste0("COL", 0:9)
concat_sep <- " / "
tab_titles <- get_titles_from_file(input_path = '../../_data/', tblid)
string_map <- default_str_map

# Process data

adsl <- pharmaverseadamjnj::adsl %>%
  filter(!!rlang::sym(popfl) == "Y" & UNBLNDFL == "Y")

adexsum <- pharmaverseadamjnj::adexsum %>%
  filter(PARAMCD == "CUMDOSE") %>%
  select(STUDYID, USUBJID, PARAMCD, PARAM, AVAL)

adsl_adexsum <- left_join(
  adsl,
  adexsum,
  by = c(
    "STUDYID" = "STUDYID",
    "USUBJID" = "USUBJID"
  )
)

lsting <- adsl_adexsum %>%
  mutate(
    AGE = explicit_na(as.character(AGE), ""),
    SEX = explicit_na(SEX, ""),
    RACE_DECODE = explicit_na(RACE_DECODE, ""),
    AVAL = explicit_na(as.character(AVAL), ""),
    AVALU = case_when(
      !is.na(AVAL) ~
        stringr::str_extract(PARAM, "(?<=\\()([^()]*?)(?=\\)[^()]*$)"),
      is.na(AVAL) ~
        ""
    ),
    EOTSTT = explicit_na(EOTSTT, ""),
    EOSSTT = explicit_na(EOSSTT, ""),
    COL0 = explicit_na(.data[[trtvar]], ""),
    COL1 = explicit_na(USUBJID, ""),
    COL2 = paste(AGE, SEX, RACE_DECODE, sep = concat_sep),
    # Optional Column: COL3/LTVISIT
    COL3 = explicit_na(LTVISIT, ""),
    COL4 = explicit_na(as.character(UNBLNDDY), ""),
    COL5 = explicit_na(as.character(TRTEDY), ""),
    # Optional Column: COL6/CUMDOSE/CUMDOSU
    COL6 = paste0(AVAL, " ", AVALU),
    COL7 = explicit_na(stringi::stri_trans_totitle(UNBREAS), ""),
    COL8 = case_when(
      EOTSTT == "DISCONTINUED" ~ "Yes",
      EOTSTT != "DISCONTINUED" ~ "No"
    ),
    COL9 = case_when(
      EOSSTT == "DISCONTINUED" ~ "Yes",
      EOSSTT != "DISCONTINUED" ~ "No"
    )
  ) %>%
  arrange(COL0, COL1)

lsting <- var_relabel(
  lsting,
  COL0 = "Treatment Group",
  COL1 = "Subject ID",
  COL2 = paste("Age (years)", "Sex", "Race", sep = concat_sep),
  # Optional Column: COL3/LTVISIT
  COL3 = "Last Visit~[super a]",
  COL4 = "Study Day~[super b] of Unblinding",
  COL5 = "Study Day~[super b] of Last Study Agent Administered",
  # Optional Column: COL6/CUMDOSE/CUMDOSU
  COL6 = "Total Dose (unit)~[super c]",
  COL7 = "Reason for Unblinding",
  COL8 = "Was Study Agent Discontinued?",
  COL9 = "Was Study Participation Discontinued Prematurely?"
)

# Build listing

result <- rlistings::as_listing(
  df = lsting,
  key_cols = key_cols,
  disp_cols = disp_cols,
)

# Add titles and footnotes

result <- set_titles(result, tab_titles)

# Output listing

tt_to_tlgrtf(string_map = string_map, tt = head(result, 100), file = fileid, orientation = "landscape")

LSIDS03: Listing of Subjects Who Were Unblinded During the Study; Analysis Set (Study jjcs - core)

Treatment Group

Subject ID

Age (years) / Sex / Race

Last Visita

Study Dayb of Unblinding

Study Dayb of Last Study Agent Administered

Total Dose (unit)c

Reason for Unblinding

Was Study Agent Discontinued?

Was Study Participation Discontinued Prematurely?

Xanomeline High Dose

01-701-1028

71 / M / Asian

Last Treatment Visit

1

100

3661 [unit]

Unblind Reason

No

No

01-701-1034

77 / F / White

Last Treatment Visit

1

300

445 [unit]

Unblind Reason

No

No

01-701-1146

75 / F / Unknown

Last Treatment Visit

1

400

682 [unit]

Unblind Reason

Yes

Yes

01-701-1148

57 / M / Not reported

Last Treatment Visit

1

100

3301 [unit]

Unblind Reason

No

No

01-701-1181

79 / F / Not reported

Last Treatment Visit

1

200

3375 [unit]

Unblind Reason

Yes

Yes

01-701-1239

56 / M / White

Last Treatment Visit

1

400

723 [unit]

Unblind Reason

No

No

01-701-1275

61 / M / White

Last Treatment Visit

1

100

643 [unit]

Unblind Reason

No

No

01-701-1287

56 / F / Multiple

Last Treatment Visit

1

100

2233 [unit]

Unblind Reason

No

No

01-701-1302

61 / M / Asian

Last Treatment Visit

1

400

1285 [unit]

Unblind Reason

Yes

No

01-701-1360

67 / M / Multiple

Last Treatment Visit

1

50

3744 [unit]

Unblind Reason

Yes

Yes

01-701-1383

72 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

400

1592 [unit]

Unblind Reason

No

No

01-701-1444

63 / M / American Indian or Alaska Native

Last Treatment Visit

1

100

3217 [unit]

Unblind Reason

Yes

Yes

01-703-1076

69 / M / White

Last Treatment Visit

1

50

4866 [unit]

Unblind Reason

Yes

Yes

01-703-1258

78 / F / Black or African American

Last Treatment Visit

1

300

4920 [unit]

Unblind Reason

Yes

No

01-703-1335

67 / F / Not reported

Last Treatment Visit

1

300

4144 [unit]

Unblind Reason

Yes

Yes

01-703-1403

67 / M / Multiple

Last Treatment Visit

1

200

4799 [unit]

Unblind Reason

Yes

Yes

01-704-1008

76 / F / White

Last Treatment Visit

1

300

1671 [unit]

Unblind Reason

No

No

01-704-1017

77 / M / Asian

Last Treatment Visit

1

200

1561 [unit]

Unblind Reason

Yes

Yes

01-704-1065

75 / M / Multiple

Last Treatment Visit

1

300

4487 [unit]

Unblind Reason

Yes

Yes

01-704-1074

80 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

100

1741 [unit]

Unblind Reason

No

No

01-704-1093

79 / M / American Indian or Alaska Native

Last Treatment Visit

1

400

1035 [unit]

Unblind Reason

Yes

Yes

01-704-1266

82 / M / Multiple

Last Treatment Visit

1

300

3347 [unit]

Unblind Reason

Yes

No

01-705-1280

56 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

400

3394 [unit]

Unblind Reason

No

No

01-705-1281

73 / F / Not reported

Last Treatment Visit

1

300

4016 [unit]

Unblind Reason

Yes

Yes

01-705-1303

72 / M / Unknown

Last Treatment Visit

1

200

4880 [unit]

Unblind Reason

Yes

Yes

01-705-1310

74 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

50

2580 [unit]

Unblind Reason

Yes

Yes

01-705-1382

82 / M / Multiple

Last Treatment Visit

1

100

868 [unit]

Unblind Reason

No

Yes

01-708-1213

76 / F / Unknown

Last Treatment Visit

1

200

4105 [unit]

Unblind Reason

No

Yes

01-708-1216

78 / M / Asian

Last Treatment Visit

1

100

4138 [unit]

Unblind Reason

Yes

Yes

01-708-1236

86 / F / White

Last Treatment Visit

1

300

3262 [unit]

Unblind Reason

Yes

Yes

01-708-1336

73 / M / Other

Last Treatment Visit

1

200

4927 [unit]

Unblind Reason

No

No

01-708-1347

61 / F / White

Last Treatment Visit

1

200

2169 [unit]

Unblind Reason

No

Yes

01-708-1372

84 / M / Not reported

Last Treatment Visit

1

400

1322 [unit]

Unblind Reason

Yes

Yes

01-709-1099

79 / F / Multiple

Last Treatment Visit

1

300

2619 [unit]

Unblind Reason

No

No

01-709-1168

72 / F / American Indian or Alaska Native

Last Treatment Visit

1

50

572 [unit]

Unblind Reason

Yes

No

01-709-1309

65 / M / American Indian or Alaska Native

Last Treatment Visit

1

300

3825 [unit]

Unblind Reason

No

No

01-709-1329

70 / M / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

300

756 [unit]

Unblind Reason

Yes

Yes

01-710-1006

77 / M / Asian

Last Treatment Visit

1

300

3309 [unit]

Unblind Reason

No

No

01-710-1021

79 / M / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

300

1225 [unit]

Unblind Reason

Yes

No

01-710-1137

79 / F / Multiple

Last Treatment Visit

1

300

4505 [unit]

Unblind Reason

Yes

Yes

01-710-1142

76 / F / Not reported

Last Treatment Visit

1

100

1884 [unit]

Unblind Reason

Yes

Yes

01-710-1187

78 / F / Unknown

Last Treatment Visit

1

400

510 [unit]

Unblind Reason

No

No

01-710-1278

81 / M / Asian

Last Treatment Visit

1

300

1435 [unit]

Unblind Reason

Yes

Yes

01-710-1354

73 / M / Black or African American

Last Treatment Visit

1

200

3500 [unit]

Unblind Reason

No

No

01-710-1408

80 / M / Multiple

Last Treatment Visit

1

50

298 [unit]

Unblind Reason

No

No

01-711-1433

84 / F / Asian

Last Treatment Visit

1

400

2045 [unit]

Unblind Reason

Yes

Yes

01-713-1141

79 / M / White

Last Treatment Visit

1

400

2384 [unit]

Unblind Reason

Yes

Yes

01-714-1288

77 / M / Multiple

Last Treatment Visit

1

300

3820 [unit]

Unblind Reason

No

No

01-714-1425

81 / M / Black or African American

Last Treatment Visit

1

50

3686 [unit]

Unblind Reason

Yes

Yes

01-715-1319

65 / M / Multiple

Last Treatment Visit

1

300

3797 [unit]

Unblind Reason

Yes

Yes

01-715-1321

75 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

400

1625 [unit]

Unblind Reason

Yes

Yes

01-716-1030

83 / F / Black or African American

Last Treatment Visit

1

400

3929 [unit]

Unblind Reason

No

No

01-716-1071

78 / F / Black or African American

Last Treatment Visit

1

300

4590 [unit]

Unblind Reason

Yes

No

01-716-1189

81 / M / Asian

Last Treatment Visit

1

400

1369 [unit]

Unblind Reason

No

Yes

01-716-1229

73 / F / Asian

Last Treatment Visit

1

200

3984 [unit]

Unblind Reason

Yes

Yes

01-716-1364

84 / F / Unknown

Last Treatment Visit

1

200

4319 [unit]

Unblind Reason

No

No

01-716-1373

74 / M / American Indian or Alaska Native

Last Treatment Visit

1

400

3481 [unit]

Unblind Reason

Yes

No

01-716-1418

80 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

200

2820 [unit]

Unblind Reason

No

No

01-716-1447

72 / F / Unknown

Last Treatment Visit

1

400

4744 [unit]

Unblind Reason

No

No

01-717-1109

84 / M / Asian

Last Treatment Visit

1

400

1523 [unit]

Unblind Reason

No

No

01-717-1357

77 / M / White

Last Treatment Visit

1

100

3353 [unit]

Unblind Reason

Yes

Yes

01-718-1101

82 / M / Asian

Last Treatment Visit

1

100

4406 [unit]

Unblind Reason

Yes

Yes

01-718-1328

86 / M / Not reported

Last Treatment Visit

1

100

3352 [unit]

Unblind Reason

Yes

Yes

01-718-1371

69 / F / Unknown

Last Treatment Visit

1

400

3454 [unit]

Unblind Reason

Yes

Yes

Xanomeline Low Dose

01-701-1033

74 / M / Multiple

Last Treatment Visit

1

50

2167 [unit]

Unblind Reason

Yes

No

01-701-1111

81 / F / White

Last Treatment Visit

1

200

2572 [unit]

Unblind Reason

No

Yes

01-701-1115

84 / M / Black or African American

Last Treatment Visit

1

400

3252 [unit]

Unblind Reason

Yes

Yes

01-701-1188

71 / M / White

Last Treatment Visit

1

100

933 [unit]

Unblind Reason

Yes

No

01-701-1192

80 / F / Not reported

Last Treatment Visit

1

50

238 [unit]

Unblind Reason

No

No

01-701-1211

76 / F / Other

Last Treatment Visit

1

50

4245 [unit]

Unblind Reason

Yes

Yes

01-701-1294

67 / M / Other

Last Treatment Visit

1

400

2017 [unit]

Unblind Reason

No

Yes

01-701-1317

68 / M / Unknown

Last Treatment Visit

1

50

4352 [unit]

Unblind Reason

No

No

01-701-1324

79 / M / Asian

Last Treatment Visit

1

200

4543 [unit]

Unblind Reason

No

No

01-701-1341

51 / M / American Indian or Alaska Native

Last Treatment Visit

1

100

1354 [unit]

Unblind Reason

No

Yes

01-701-1429

84 / F / American Indian or Alaska Native

Last Treatment Visit

1

50

2949 [unit]

Unblind Reason

Yes

Yes

01-701-1442

57 / F / Asian

Last Treatment Visit

1

200

1596 [unit]

Unblind Reason

No

No

01-702-1082

84 / F / Asian

Last Treatment Visit

1

400

1244 [unit]

Unblind Reason

No

No

01-703-1119

81 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

300

2288 [unit]

Unblind Reason

Yes

Yes

01-703-1182

84 / M / Other

Last Treatment Visit

1

300

2075 [unit]

Unblind Reason

Yes

Yes

01-703-1197

76 / F / Other

Last Treatment Visit

1

300

1716 [unit]

Unblind Reason

Yes

Yes

01-703-1279

72 / F / Unknown

Last Treatment Visit

1

50

3288 [unit]

Unblind Reason

Yes

No

01-703-1379

81 / F / Black or African American

Last Treatment Visit

1

200

3785 [unit]

Unblind Reason

No

No

01-704-1009

83 / M / Unknown

Last Treatment Visit

1

300

2204 [unit]

Unblind Reason

No

Yes

01-704-1025

81 / F / Asian

Last Treatment Visit

1

200

958 [unit]

Unblind Reason

Yes

Yes

01-704-1114

77 / M / Multiple

Last Treatment Visit

1

50

967 [unit]

Unblind Reason

Yes

Yes

01-704-1120

71 / F / Black or African American

Last Treatment Visit

1

50

4345 [unit]

Unblind Reason

Yes

Yes

01-704-1135

74 / F / Black or African American

Last Treatment Visit

1

300

4027 [unit]

Unblind Reason

No

No

01-704-1218

81 / F / American Indian or Alaska Native

Last Treatment Visit

1

200

3424 [unit]

Unblind Reason

No

No

01-704-1325

81 / M / White

Last Treatment Visit

1

300

4663 [unit]

Unblind Reason

Yes

Yes

01-705-1199

87 / M / Black or African American

Last Treatment Visit

1

50

493 [unit]

Unblind Reason

Yes

Yes

01-705-1292

60 / F / American Indian or Alaska Native

Last Treatment Visit

1

400

815 [unit]

Unblind Reason

No

No

01-705-1393

84 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

300

3762 [unit]

Unblind Reason

Yes

Yes

01-706-1384

74 / F / Multiple

Last Treatment Visit

1

50

4406 [unit]

Unblind Reason

No

No

01-708-1019

68 / M / Asian

Last Treatment Visit

1

400

1177 [unit]

Unblind Reason

Yes

Yes

01-708-1032

62 / M / Multiple

Last Treatment Visit

1

100

3770 [unit]

Unblind Reason

No

Yes

01-708-1272

82 / M / Not reported

Last Treatment Visit

1

200

201 [unit]

Unblind Reason

Yes

Yes

01-708-1297

61 / M / Not reported

Last Treatment Visit

1

300

3732 [unit]

Unblind Reason

Yes

Yes

01-708-1348

79 / F / Multiple

Last Treatment Visit

1

400

3914 [unit]

Unblind Reason

No

No

01-708-1353

87 / F / Native Hawaiian or other Pacific Islander

Last Treatment Visit

1

50

967 [unit]

Unblind Reason

No

No

01-709-1081

86 / F / White

Last Treatment Visit

1

100

4439 [unit]

Unblind Reason

Yes

Yes

a Last visit is the last visit which the subject attended before discontinuing study agent

b Study day is relative to [the start of [study treatment]].

c Total dose is defined as a cumulative sum of all study agent administered.

[lsids03.docx][/usr/lib/rstudio-server/bin/quarto/share/rmd/rmd.R] 12JAN2026, 16:07

Download RTF file

LSIDS02
LSIDS04
Source Code
---
title: LSIDS03
subtitle: Listing of Subjects Who Were Unblinded During the Study
---

------------------------------------------------------------------------

{{< include ../../_utils/envir_hook.qmd >}}

```{r setup, echo = FALSE, warning = FALSE, message = FALSE}
options(docx.add_datetime = FALSE, tidytlg.add_datetime = FALSE)
envsetup_config_name <- "default"

# Path to the combined config file
envsetup_file_path <- file.path("../..", "envsetup.yml")

Sys.setenv(ENVSETUP_ENVIRON = '')
library(envsetup)
loaded_config <- config::get(config = envsetup_config_name, file = envsetup_file_path)
envsetup::rprofile(loaded_config)


dpscomp <- compound
dpspdr <- paste(protocol,dbrelease,rpteff,sep="__")

aptcomp <- compound
aptpdr <- paste(protocol,dbrelease,rpteff,sep="__")

###### Study specific updates (formerly in envre)

dpscomp <- "standards"
dpspdr <- "jjcs__NULL__jjcs - core"

apt <- FALSE
library(junco)
default_str_map <- rbind(default_str_map, c("&ctcae", "5.0"))

```

## Output

:::: panel-tabset
## {{< fa regular file-lines sm fw >}} Preview

```{r variant1, results='hide', warning = FALSE, message = FALSE}

# Program Name:              lsids03.R

# Prep environment

library(envsetup)
library(tern)
library(dplyr)
library(rtables)
library(rlistings)
library(junco)
library(stringi)

# Define script level parameters

tblid <- "LSIDS03"
fileid <- tblid
popfl <- "SAFFL"
trtvar <- "TRT01P"
key_cols <- c("COL0", "COL1")
disp_cols <- paste0("COL", 0:9)
concat_sep <- " / "
tab_titles <- get_titles_from_file(input_path = '../../_data/', tblid)
string_map <- default_str_map

# Process data

adsl <- pharmaverseadamjnj::adsl %>%
  filter(!!rlang::sym(popfl) == "Y" & UNBLNDFL == "Y")

adexsum <- pharmaverseadamjnj::adexsum %>%
  filter(PARAMCD == "CUMDOSE") %>%
  select(STUDYID, USUBJID, PARAMCD, PARAM, AVAL)

adsl_adexsum <- left_join(
  adsl,
  adexsum,
  by = c(
    "STUDYID" = "STUDYID",
    "USUBJID" = "USUBJID"
  )
)

lsting <- adsl_adexsum %>%
  mutate(
    AGE = explicit_na(as.character(AGE), ""),
    SEX = explicit_na(SEX, ""),
    RACE_DECODE = explicit_na(RACE_DECODE, ""),
    AVAL = explicit_na(as.character(AVAL), ""),
    AVALU = case_when(
      !is.na(AVAL) ~
        stringr::str_extract(PARAM, "(?<=\\()([^()]*?)(?=\\)[^()]*$)"),
      is.na(AVAL) ~
        ""
    ),
    EOTSTT = explicit_na(EOTSTT, ""),
    EOSSTT = explicit_na(EOSSTT, ""),
    COL0 = explicit_na(.data[[trtvar]], ""),
    COL1 = explicit_na(USUBJID, ""),
    COL2 = paste(AGE, SEX, RACE_DECODE, sep = concat_sep),
    # Optional Column: COL3/LTVISIT
    COL3 = explicit_na(LTVISIT, ""),
    COL4 = explicit_na(as.character(UNBLNDDY), ""),
    COL5 = explicit_na(as.character(TRTEDY), ""),
    # Optional Column: COL6/CUMDOSE/CUMDOSU
    COL6 = paste0(AVAL, " ", AVALU),
    COL7 = explicit_na(stringi::stri_trans_totitle(UNBREAS), ""),
    COL8 = case_when(
      EOTSTT == "DISCONTINUED" ~ "Yes",
      EOTSTT != "DISCONTINUED" ~ "No"
    ),
    COL9 = case_when(
      EOSSTT == "DISCONTINUED" ~ "Yes",
      EOSSTT != "DISCONTINUED" ~ "No"
    )
  ) %>%
  arrange(COL0, COL1)

lsting <- var_relabel(
  lsting,
  COL0 = "Treatment Group",
  COL1 = "Subject ID",
  COL2 = paste("Age (years)", "Sex", "Race", sep = concat_sep),
  # Optional Column: COL3/LTVISIT
  COL3 = "Last Visit~[super a]",
  COL4 = "Study Day~[super b] of Unblinding",
  COL5 = "Study Day~[super b] of Last Study Agent Administered",
  # Optional Column: COL6/CUMDOSE/CUMDOSU
  COL6 = "Total Dose (unit)~[super c]",
  COL7 = "Reason for Unblinding",
  COL8 = "Was Study Agent Discontinued?",
  COL9 = "Was Study Participation Discontinued Prematurely?"
)

# Build listing

result <- rlistings::as_listing(
  df = lsting,
  key_cols = key_cols,
  disp_cols = disp_cols,
)

# Add titles and footnotes

result <- set_titles(result, tab_titles)

# Output listing

tt_to_tlgrtf(string_map = string_map, tt = head(result, 100), file = fileid, orientation = "landscape")
```
```{r result1, echo=FALSE, message=FALSE, warning=FALSE, test = list(result_v1 = "result")}
tt_to_flextable_j(head(result,100), tblid, string_map = string_map)
```

[Download RTF file](`r paste0(tolower(tblid), '.rtf')`)
::::

Made with ❤️ by the J&J Team

  • Edit this page
  • Report an issue
Cookie Preferences