This report provides a comprehensive analysis of clinical trial data. Key highlights include:
reactable(
ctg_data,
filterable = TRUE,
searchable = TRUE,
bordered = TRUE,
striped = TRUE,
highlight = TRUE,
compact = TRUE,
defaultPageSize = 10,
columns = list(
`Study Status` = colDef(
style = function(value) {
status_colors <- get_colors(length(unique(ctg_data$`Study Status`)))
color <- status_colors[match(value, unique(ctg_data$`Study Status`))]
list(background = color, color = 'white')
}
),
Enrollment = colDef(
format = colFormat(separators = TRUE)
),
`Start Date` = colDef(
format = colFormat(date = TRUE)
),
`Completion Date` = colDef(
format = colFormat(date = TRUE)
)
),
defaultColDef = colDef(
cell = function(value) {
if (is.character(value)) {
value <- truncate_text(value)
}
value
},
minWidth = 100
)
)