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 RMarkdown ? By the same way we can display `t 2+2`
, but replacing t
with r
executes the R code 2+2
.
The only way I have found so far is:
<p><code class="r">`</code><code class="r">r 2+2`</code></p>
Not very convenient. Maybe I should define a new css for doing that more conveniently ?
strange.name <- 'abc\\`def'
:nchar(strange.name) [1] 8
(It even looks like it survived the SO version of Markdown except for the fact that I used two backslashes at the console and only one was showing up in this comment until I added a third one.)r 2+2
in Rmarkown between backticks, one gets 4 in the output. I'm afraid your comment has nothing to do with this issue.