From the course: Creating Reports and Presentations with R Markdown and RStudio
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The YAML header of an .Rmd file - RStudio Tutorial
From the course: Creating Reports and Presentations with R Markdown and RStudio
The YAML header of an .Rmd file
- There are many different components to an RMarkdown document. Let's take a detailed look at the YAML header, which I've marked here as lines one through four. The YAML header is at the very top of the document. It needs to be the very first thing in the .rmd file. The header is delimited by three dashes at both the beginning, and end. Everything between these dashes is written in YAML. So what's YAML? YAML is an extremely popular language choice for configuration files. And that's kind of how we use it in our markdown. YAML is very simple. It's a set of key value pairs with colons separating the option name, and option value for your RMarkdown document. It's not really necessary to learn YAML. It's a thing that we use to set knitting options in RMarkdown documents. However, it's extremely useful to know the header is written in YAML, as it makes it much easier to google exactly how do I modify X in my document. Okay, now let's cover more explicitly how YAML is used in the .rmd file.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Installing R Markdown1m 41s
-
R Markdown, knitting, and generating outputs4m 13s
-
(Locked)
The YAML header of an .Rmd file3m 29s
-
(Locked)
Code chunks and global code chunk settings4m 8s
-
(Locked)
Writing and running R code in R Markdown files5m 45s
-
(Locked)
Splitting documents into sections or slides in R Markdown4m 21s
-
(Locked)
Tabbed sections in R Markdown HTML reports2m 22s
-
(Locked)
Formatting text in R Markdown files4m 5s
-
(Locked)
Bullets and lists in R Markdown2m 51s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-