0
0
R Programmingprogramming~10 mins

R Markdown document creation in R Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start an R Markdown document with the correct YAML header.

R Programming
---
title: "My Document"
output: [1]
---
Drag options to blanks, or click blank then click option'
Ahtml_document
Bpdf_document
Cword_document
Dmarkdown_document
Attempts:
3 left
💡 Hint
Common Mistakes
Using an output format not supported by R Markdown
Forgetting to put quotes around the title
2fill in blank
medium

Complete the code to insert an R code chunk in R Markdown.

R Programming
```[1]
summary(cars)
```
Drag options to blanks, or click blank then click option'
Asql
Bpython
Cbash
Dr
Attempts:
3 left
💡 Hint
Common Mistakes
Using other languages like python or bash inside R Markdown R chunks
Forgetting the triple backticks
3fill in blank
hard

Fix the error in the YAML header to correctly specify the author.

R Programming
---
title: "Analysis"
author: [1]
output: html_document
---
Drag options to blanks, or click blank then click option'
Aauthor: John Doe
BJohn Doe
C"John Doe"
D'John Doe'
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the author name
Including the key name again inside the value
4fill in blank
hard

Fill both blanks to create a code chunk with echo turned off.

R Programming
```[1] [2]
plot(pressure)
```
Drag options to blanks, or click blank then click option'
Ar
Bpython
Cecho=FALSE
Decho=TRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong language name
Setting echo to TRUE instead of FALSE
5fill in blank
hard

Fill all three blanks to create a YAML header with title, author, and date.

R Programming
---
title: [1]
author: [2]
date: [3]
output: html_document
---
Drag options to blanks, or click blank then click option'
A"My Report"
B"Alice Smith"
C"2024-06-01"
D2024-06-01
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the date
Using unquoted strings in YAML