Demographics

Table 1: Descriptive Statistics
# Check if we have the right columns (generic fallback)
library(dplyr)
if(exists("raw_data")) {
  
  # Select numeric columns for the generic summary
  # In a real study, you would list specific names like c("age", "gender")
  
  raw_data %>%
    # Select only numeric or factor columns for the generic table
    select(where(is.numeric), where(is.character), -starts_with("id")) %>%
    
    # Generate Table
    # (Using basic summary for dependency-free MVP, but could be tables::table1)
    summary() %>%
    knitr::kable(caption = "Sample Output: Summary Statistics")
    
} else {
  print("Run Data Import Step First")
}
[1] "Run Data Import Step First"