Chapter 15 Other Languages

    In knitr, each language is supported through a language engine. Language engines are essentially functions that take the source code and options of a chunk as the input, and return a character string as the output. They are managed through the object knitr::knit_engines. You may check the existing engines via:

    1. ## [1] "awk" "bash" "coffee" "gawk"
    2. ## [5] "groovy" "haskell" "lein" "mysql"
    3. ## [13] "Rscript" "ruby" "sas" "scala"
    4. ## [17] "sed" "sh" "stata" "zsh"
    5. ## [21] "highlight" "Rcpp" "tikz" "dot"
    6. ## [29] "asy" "cat" "asis" "stan"
    7. ## [37] "sql" "go" "python" "julia"

    of the R Markdown Definitive Guide (Xie, Allaire, and Grolemund 2018) shows examples of using Python, Shell, SQL, Rcpp, Stan, JavaScript, CSS, Julia, C, and Fortran code in R Markdown. In this chapter, we will show more language engines, and you may find more examples in the repository at (look for filenames that contain the word “engine”).

    Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.