| inline_expr | R Documentation |
This is a convenience function to write the "source code" of inline R
expressions. For example, if you want to write `r 1+1` literally in an
R Markdown document, you may write `` `r knitr::inline_expr('1+1')` ``;
for Rnw documents, this may be \Sexpr{knitr::inline_expr{'1+1'}}.
inline_expr(code, syntax)
code |
Character string of the inline R source code. |
syntax |
A character string to specify the syntax, e.g., |
A character string marked up using the inline R code syntax.
library(knitr)
inline_expr("1+1", "rnw")
inline_expr("1+1", "html")
inline_expr("1+1", "md")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.