Rmarkdown hide code6/5/2023 R markdown is able to render (almost) all of the text formatting that you are likely to need such as italics, bold, strike-through, super and subscript as well as bulleted and numbered lists, headers and footers, images, links to other documents or web pages and also equations. For example, if you want to include a table of contents you would modify the output: field in the YAML header as followsĪs mentioned above, one of the great things about R markdown is that you don’t need to rely on your word processor to bring your R code, analysis and writing together. Also, indentation in the YAML header has a meaning, so be careful when aligning text. If you need multiple output formats for your R markdown document check whether your YAML options are compatible between these formats. Just a note of caution, many of the options you can specify in the YAML header will work with both HTML and pdf formatted documents, but not all. If you want to explore the plethora of other options see here. You can also change the default font and font size for the whole document and even include fancy options such as a table of contents and inline references and a bibliography. If you would like to change the output to pdf format then you can change it from output: html_document to output: pdf_document (you can also set more than one output format if you like). In the YAML header above the output format is set to HTML. title : My first R markdown document author : Jane Doe date : Maoutput : html_document.
0 Comments
Leave a Reply. |