Читать книгу Computational Statistics in Data Science - Группа авторов - Страница 34
1.3 RStudio and Rmarkdown
ОглавлениеRStudio is an organization that develops free and enterprise‐ready tools for working with the R language. Their IDE (also called RStudio) integrates the R console, file browser, script editor, and more in one unified user interface. Through the use of project‐associated directories/files, the entire projects are nearly self‐contained and easily shared among different systems.
Similar to Jupyter Notebooks, RStudio supports a file format called Rmarkdown that allows for code to be embedded and executed in a markdown‐style document. The basic setup is a YAML (https://yaml.org/) header, markdown text, and code chunks. This simple structure can be built upon through the use of the knitr package that can build PDF, HTML, or XML (MS Word) documents and – via the R package rticles – build journal‐style documents from the same basic file format. Knitr can also create slideshows just by changing a parameter in the YAML header. This kind of flexibility for document creation is a huge (and unique) advantage to using Rmarkdown, and it is easily done using the RStudio IDE. Notably, Rmarkdown supports many other programming engines besides R, such as Python, C++, and Julia.