I want to change the footnote marks in my gt table so that in the wt column, I do not have the number 2 but an asterisk (*).
I want to keep footnote mark 1.
Any help or guidance is appreciated
library(gt)
# Create a sample gt table with custom footnote marks
my_table <- gt(
head(mtcars, 10))
my_table %>%
tab_footnote(
footnote = "Sequenced twice.",
locations = cells_body(columns=disp, rows=c(1,2))
) %>%
tab_footnote(
footnote = "Change mark",
locations = cells_body(columns=wt, rows=c(4,5))
)
CodePudding user response:
We may use opt_footnote_marks
library(gt)
my_table %>%
tab_footnote(
footnote = "Sequenced twice.",
locations = cells_body(columns=disp, rows=c(1,2))
) %>%
tab_footnote(
footnote = "Change mark",
locations = cells_body(columns=wt, rows=c(4,5))
) %>%
opt_footnote_marks(
marks = c("1", "*"))
-output