quarto_tables <- readRDS (sprintf ("%sdata/processed/_objects/_rds/quarto_tables.rds" , rootdir))
quarto_tables$ table_participants %>%
filter (is.na (DATE_BIRTH)) %>%
mutate (DATE_BIRTH = paste0 (substr (BRTHDD, 1 , 4 ), "-" , substr (BRTHDD, 5 , 6 ), "-" , substr (BRTHDD, 7 , 8 ))) %>%
mutate (YEAR = substr (BRTHDD, 1 , 4 ),
MONTH = substr (BRTHDD, 5 , 6 ),
DAY = substr (BRTHDD, 7 , 8 ),
FLAG_BIRTH = "INVALID DATE" ) %>%
select (FLAG_BIRTH, everything (), - BRTHDD, - SEX) %>%
reactable (
searchable = TRUE ,
filterable = TRUE ,
showPageSizeOptions = TRUE ,
pageSizeOptions = c (10 , 20 , 50 ),
defaultPageSize = 10 ,
striped = TRUE ,
highlight = TRUE ,
bordered = TRUE ,
defaultColDef = colDef (
align = "left" ,
minWidth = 120 ,
headerStyle = list (background = "#f7f7f8" )
),
columns = list (
FLAG_BIRTH = colDef (
name = "Flag" ,
style = list (fontWeight = "bold" )
),
DATE_BIRTH = colDef (
name = "Birth Date" ,
style = list (color = "#2c3e50" )
),
YEAR = colDef (
name = "Year" ,
style = list (color = "#2c3e50" )
),
MONTH = colDef (
name = "Month" ,
style = list (color = "#2c3e50" )
),
DAY = colDef (
name = "Day" ,
style = list (color = "#2c3e50" )
)
),
theme = reactableTheme (
borderColor = "#dfe2e5" ,
stripedColor = "#f6f8fa" ,
headerStyle = list (
backgroundColor = "#f8f9fa" ,
color = "#1a162d" ,
fontWeight = "bold" ,
borderColor = "#dfe2e5"
),
cellStyle = list (
padding = "8px 12px"
)
)
)