parse=TRUE
来解析表格grob中的plotmath表达式。有关详细信息和示例,请参见vignette。# Create plotmath superscript strings
df$b = paste0(df$b,"^",rep(1:2,3))
# Define theme to parse plotmath expressions
tt = ttheme_default(core=list(fg_params=list(parse=TRUE)))
tg_df <- tableGrob(d = df, theme=tt)
grid.draw(tg_df)