I would like to add mathematical notation: to my flextable.
This is my mwe and attempt:
df = data.frame(item = c("vo2", "age"),
mean = c(30,40))
df
flextable(df)%>%
mk_par(i=1, j=1, as_paragraph(" $\dot{V}$O", as_sub(2peak) ))
# also attempted
flextable(df)%>%
mk_par(i=1, j=1, as_paragraph(as_equation($\dot{V}$O), as_sub(2peak) ))
You need to use as_equation()
that expects MathJax syntax:
library(flextable)
df <- data.frame(
item = c("vo2", "age"),
mean = c(30, 40)
)
flextable(df) |>
mk_par(i = 1, j = 1, as_paragraph(
as_equation("\\dot{V}0_{2peak}")
))