0
0
R Programmingprogramming~10 mins

Why reproducible reports matter in R Programming - Test Your Understanding

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

Complete the code to load the knitr package for reproducible reports.

R Programming
library([1])
Drag options to blanks, or click blank then click option'
Aknitr
Bdplyr
Cggplot2
Dshiny
Attempts:
3 left
💡 Hint
Common Mistakes
Loading unrelated packages like ggplot2 or shiny instead of knitr.
2fill in blank
medium

Complete the code to create a reproducible report using R Markdown.

R Programming
rmarkdown::render('[1].Rmd')
Drag options to blanks, or click blank then click option'
Aanalysis
Bscript
Cdata
Dreport
Attempts:
3 left
💡 Hint
Common Mistakes
Using file names without the '.Rmd' extension or unrelated names.
3fill in blank
hard

Fix the error in the code to include code chunks in R Markdown.

R Programming
```{r [1]
summary(cars)
```
Drag options to blanks, or click blank then click option'
Aecho=FALSE
Beval=TRUE
Csetup
Dinclude=TRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using chunk options instead of a chunk label in the curly braces.
4fill in blank
hard

Fill both blanks to create a reproducible report that includes a plot and hides code.

R Programming
```{r [1], [2]=FALSE}
plot(cars)
```
Drag options to blanks, or click blank then click option'
Aplot_chunk
Becho
Ceval
Dmessage
Attempts:
3 left
💡 Hint
Common Mistakes
Using options as chunk names or forgetting to hide code properly.
5fill in blank
hard

Fill all three blanks to create a reproducible report that filters data, summarizes it, and prints the result.

R Programming
library(dplyr)
result <- mtcars %>% filter([1] > 20) %>% summarize([2] = mean([3]))
print(result)
Drag options to blanks, or click blank then click option'
Ahp
Bavg_mpg
Cmpg
Dcyl
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up column names or summary names.