I'm trying to use an inline expression in a .Rmd markdown file. I'm converting the .Rmd file to a PDF using Pandoc. The contents of my file is like this:
Report
========================================================
This is my text and this is my expression 100km^2
```{r}
summary(cars)
```
I expected 100km^s to render normally, but it renders literally as '100km^2'. How can I get the expression to render?
r expression(100 * km^2)
") would be better, but knitr doesn't know what to do with an expression to display inline, which it sees as a list with multiple elements. – baptisteexpression()
? – baptiste