I am trying to create a results table in R (or Rmarkdown) and trying to add Greek letters for various parameters as row entries and can't seem to get it to work. Here is an example
library(knitr)library(xtable)library(tidyverse)df <- tibble(Truth = c(-0.75, 0.5), Post_Mean = c(-0.74, 0.52))Parameter <- c("$\\gamma$", "$\\beta$")dt <- tibble(Parameter = Parameter, df)dt# print(xtable(dt, type = "latex"), sanitize.text.function = function(x) {x})
I tried a few suggestions I found online but none seemed to work. Any ideas on how I can work around this?