I am trying to insert a greek delta into a covariate label within stargazer. I have tried \Delta but it returns an error about the escape character '\D'. I have attempted with '\', wrapping in '$' and on and on.
What does work is to use the string 'CHG' and then replace all instances of 'CHG' in the html output with Δ.
Sample of R Markdown. Current reference to Delta returning 'delta' not the greek symbol.
I have tried one slash, 2, 3, 4. I have tried wrapping in '${ ... }$
output: html_doc
#```{r setup, include = FALSE, warning = FALSE, comment = FALSE}
library(dplyr)
library(stringr)
library(tidyr)
library(stargazer)
library(knitr)
x <- rnorm(1000)
y <- rnorm(1000)*x
df <- data.frame(x,y)
model1 <- lm(y~x, data = df)
#```{r Perf1.1, echo = FALSE, warning = FALSE, comment = FALSE, message = FALSE, results='asis'}
stargazer(model1, header=FALSE, type = 'html',
dep.var.labels = "\\Delta y")