I want to evaluate these variables within LaTeX, but the inline code convention `r ` will not evaluate within $$ $$.
K <- 1e3
P <- 0.6
$$Binomial(k= `r K`, p = `r P`)$$
I'm not sure if you can execute inline code within LaTeX environment in quarto or RMarkdown.
Here's a workaround which displays the intended output.
Chunk options: {r results='asis', echo=FALSE}
Chunk contents:
K <- 1e3
P <- 0.6
cat("$$Binomial(k = ", K, ", p= ", P, ")$$")
Result: