I have a variable named statistical value of life in millions of 2006 dollars
, and I'm trying to include the value in inline knitr code.
`r `statistical value of life in millions of 2006 dollars` `
I can't figure out how to escape the backticks.
As mentioned in the other answers to the question, you can simply escape backticks with a backslash `\` for inline formatting.
From the Code section of the Markdown syntax page: To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters: ``There is a literal backtick (`) here. ``
I think the easiest solution is to use another way of addressing the variable:
`r get('statistical value of life in millions of 2006 dollars')`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With