I wish to use in line R code as part of a header in a r markdown file. However when i knit the file the fonts used on the header are different. How can I ensure the fonts are the same. A simple example is below.
`r 1+1` Header
-------------------------
Code results can be inserted directly into the text of a . Rmd file by enclosing the code with `r ` .
You can insert an R code chunk either using the RStudio toolbar (the Insert button) or the keyboard shortcut Ctrl + Alt + I ( Cmd + Option + I on macOS).
You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.
We can insert headings and subheadings in R Markdown using the pound sign # . There are six heading/subheading sizes in R Markdown. The number of pound signs before your line of text determines the heading size, 1 being the largest heading and 6 being the smallest.
You can wrap content in backticks to denote r code inline, as follows:
## Title `r 1+1` Header
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