
4. Create a R Markdown File from a rUM Template
Source:vignettes/OO4_R_Markdown_Templates.Rmd
OO4_R_Markdown_Templates.Rmd
Introduction
The rUM
package installs several R Markdown document
templates into the RStudio menus. These include a YAML header (where you
can specify your name and the project name) and code chunks to enable
the tidyverse
package (to help with data processing), the
tidymodels
package (to help with modeling) and the
conflicted
package1.
There is also a setup code chunk that sets options to:
- show and hide code, messages and warnings
- stop R from printing ## in the output
- set number rounding to 3 decimal places
Using Code Templates in RStudio
There are four templates:
- html2 with rUM : A basic web page
- html2 Details with rUM: A web page with more details
- pdf2 showing LaTeX with rUM: A pdf (with options to control tables’ and figures’ locations and appearances)
- bookdown_site with rUM: The structure of a book
You access the templates from the File menu by choosing
- New File > R Markdown…
- Choosing From Template from the windowpane on the left
- Scrolling down until you see the rUM templates
- Click OK