
Create appendix table caption
appendix_table_caption.RdHelper function to create a properly formatted table caption for appendices.
This is useful when using flextable::set_caption() to ensure consistent
formatting with automatic numbering.
Arguments
- caption
Character. The table caption text
- appendix_letter
Character. The appendix letter (e.g., "A", "B"). If NULL, uses the value set by
set_appendix()ornew_appendix()
Examples
library(flextable)
new_appendix()
#> [1] "A"
df <- data.frame(a = 1:3)
flextable(df) |>
set_caption(appendix_table_caption("Summary statistics"))
Summary statistics a
1
2
3
# Or with set_appendix()
set_appendix("A")
flextable(df) |>
set_caption(appendix_table_caption("Model parameters"))
Model parameters a
1
2
3