I am making a table with gt and I'm looking to be able to change the values of certain rows.
library(gt)
row1<- "row1"
row2<- "row2"
rows<- rbind(row1, row2)
column1<- c(1,2)
frame<- as.data.frame(cbind(rows, column1))
gt(frame)
I'm hoping to change 'row1' and 'row2' to row_1 and row_2, with the underscores representing subscripts. I've gone through the options in tab_options and fmt but haven't found anything useful. All of the resources I've found show how to relabel columns instead of rows.
Since the row names are the names of the objects included in the table, I could just change the names of the objects, but that does not let me italicize/add subscripts or spaces between the words I'm hoping to use.
Any help would be greatly appreciated.