# NOT RUN {
library(dplyr)
lyt <- basic_table() %>%
split_cols_by("ARM") %>%
split_cols_by("SEX") %>%
split_rows_by("RACE") %>%
append_topleft("Ethnicity") %>%
analyze("AGE") %>%
append_topleft(" Age")
DM2 <- DM %>% mutate(RACE = factor(RACE), SEX = factor(SEX))
build_table(lyt, DM2)
# }
Run the code above in your browser using DataLab