How to display verbatim inline r code with backticks using Rmarkdown?

后端 未结 5 523
广开言路
广开言路 2020-12-08 19:49

By doubling the backticks in Markdown, it is easy to render some text in code style including the backticks, such as: `r 2+2`. But how to do that with RMark

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 20:20

    I just learnt about the results='asis' option.
    So, yet another way; for fun and learning :-)

    ```{r, results='asis', echo=FALSE}
    cat("`` `r 2+2` ``")
    ```
    

提交回复
热议问题