knitr::opts_chunk$set(echo = TRUE)
You can embed an R code chunk like this:
summary(cars)
You can also embed plots, for example:
plot(pressure)
knitr::kable(head(iris))
$$ 2 + 2 = 5 $$
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.