Recall & Review
beginner
What is an R Markdown document?
An R Markdown document is a file that combines text, code, and output in one place. It lets you write reports that include R code and its results, all in a single document.
Click to reveal answer
beginner
How do you start an R Markdown document?
You start by creating a file with the extension
.Rmd. The document begins with a YAML header enclosed by --- lines that sets the title, author, and output format.Click to reveal answer
beginner
What is the purpose of code chunks in R Markdown?
Code chunks are sections where you write R code. When you knit the document, these chunks run the code and show the results right in the document.
Click to reveal answer
beginner
How do you write a code chunk in R Markdown?
You write a code chunk by surrounding your R code with three backticks and curly braces with 'r', like this:<br>
```{r}
# your code here
```Click to reveal answer
beginner
What does the 'knit' button do in RStudio when working with R Markdown?
The 'knit' button runs all the R code chunks in the document and creates a finished report in the chosen format, like HTML, PDF, or Word.
Click to reveal answer
What file extension is used for R Markdown documents?
✗ Incorrect
R Markdown documents always use the .Rmd extension.
Which section in an R Markdown document sets the title and output format?
✗ Incorrect
The YAML header at the top sets metadata like title and output format.
How do you include R code in an R Markdown document?
✗ Incorrect
R code is included inside code chunks marked by three backticks and {r}.
What happens when you click the 'knit' button in RStudio?
✗ Incorrect
Clicking 'knit' runs the code and creates the final report.
Which output formats can R Markdown produce?
✗ Incorrect
R Markdown can create reports in HTML, PDF, Word, and more.
Explain the structure of an R Markdown document and how it combines text and code.
Think about how you write a report with explanations and R code together.
You got /4 concepts.
Describe the steps to create and produce a report from an R Markdown document in RStudio.
Imagine you are making a report that shows your analysis and results.
You got /5 concepts.