afun1 <- function(x, ...) {
in_rows(
row1 = 5,
row2 = c(1, 2),
.row_footnotes = list(row1 = list(RefFootnote("row 1 rfn"))),
.cell_footnotes = list(row2 = list(RefFootnote("row 2 cfn")))
)
}
afun2 <- function(x, ...) {
in_rows(
row1 = 5,
row2 = c(1, 2),
.row_footnotes = list(row1 = list(RefFootnote("row 1 rfn", symbol = "+"))),
.cell_footnotes = list(row2 = list(RefFootnote("row 2 cfn", symbol = "^")))
)
}
lyt1 <- basic_table() |>
split_cols_by("ARM") |>
analyze("AGE", afun = afun1)
build_table(lyt1, DM)
lyt2 <- basic_table() |>
split_cols_by("ARM") |>
split_rows_by("STRATA1") |>
analyze("AGE", afun = afun2)
build_table(lyt2, DM)
Run the code above in your browser using DataLab