Notice how this .Rmd file executes code in bash and python. You can open the file here in RStudio Cloud.


knitr can execute code in many languages besides R. Some of the available language engines include:

  • Python
  • SQL
  • Bash
  • Rcpp
  • Stan
  • JavaScript
  • CSS

To process a code chunk using an alternate language engine, replace the r at the start of your chunk declaration with the name of the language:

```{bash}
```

Note that chunk options like echo and results are all valid when using a language engine like python.

Learn more about using other languages with R Markdown in knitr Language Engines.