0
0
R Programmingprogramming~5 mins

R Markdown document creation in R Programming - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A.rmarkdown
B.R
C.Rmd
D.md
Which section in an R Markdown document sets the title and output format?
AYAML header
BCode chunk
CFooter
DScript section
How do you include R code in an R Markdown document?
AInside code chunks marked by ```{r} ... ```
BInside HTML tags
CBetween parentheses ()
DUsing special comments
What happens when you click the 'knit' button in RStudio?
AThe code is saved but not run
BThe document is processed and output is generated
CThe document is deleted
DThe document is converted to plain text
Which output formats can R Markdown produce?
AOnly HTML
BOnly Word
COnly PDF
DHTML, PDF, Word
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.