25.3 RStudio with KnitR

20200602 In creating a new knitr (Xie 2021) document within RStudio the minimal LaTeX markup is inserted. To do so, create a new R Sweave document under the File menu, informing RStudio to use knitr (Xie 2021) which is an advanced version of Sweave. Under the Tools menu choose Global Options and then Sweave to set the Weave option to be knitr. We can see the RStudio context below. The file contains the following minimal LaTeX code.

Into this file we will begin entering the LaTeX commands and the text of our narrative and the R code. We enter text to describe our project between the begin and end of the document and then choose the Compile PDF button on the toolbar to generate a PDF document that we can view.

References

———. 2021. Knitr: A General-Purpose Package for Dynamic Report Generation in r. https://yihui.org/knitr/.


Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.