Skip to content

Commit

Permalink
Merge pull request #34 from fhdsl/quiz_fix
Browse files Browse the repository at this point in the history
Quiz fix
  • Loading branch information
cansavvy authored Nov 20, 2024
2 parents 29a3529 + 29a818a commit a656237
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 43 deletions.
14 changes: 9 additions & 5 deletions quizzes/quiz_ch2.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ o) Less development by others needed to use R for various tasks
m) Less support for users
m) More difficult to find others who use R

? Why is R useful for reproducibility in analyses?
a) It is free which means pricing is not a barrier to reproducing results with R.
b) It has an active community who can contribute and review the reproducibility of it.
c) It has an active developer community who has made lots of handy tools which aid reproducibility.
D) All of the above
{choose-answers: 4}
? Why is R useful for reproducibility in analyses?
C) All of the answers
C) Any of these answers explain why R can be useful for reproducibility
o) It is free which means pricing is not a barrier to reproducing results with R.
o) It has an active community who can contribute and review your code.
m) It has an active developer community who has made lots of handy tools which aid reproducibility.
m) It is designed for working with data, particularly wrangling data in a reproducible way


{/quiz}
2 changes: 1 addition & 1 deletion quizzes/quiz_ch4.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ B) Writing code that you wish to save
c) Both A and B
d) Neither A nor B

What is the purpose of an R Markdown file in RStudio?
? What is the purpose of an R Markdown file in RStudio?

a) To test code
b) To write code in the Console
Expand Down
89 changes: 53 additions & 36 deletions quizzes/quiz_ch5.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@

{quiz, id: rmarkdown, attempts: 10}
{quiz, id: projects, attempts: 10}

## Reproducible code

{choose-answers: 4}
? Why is a well-organized project beneficial for reproducibility?

C) All of the answers
C) Any of the answers
o) It can enable others to understand exactly what files do what
o) It can actually make your work more efficient in the long term
m) It can actually enable others to just take your code and run it, even with more complicated file structures
m) It can help you and others more easily trace how specific files, data, or plots are generated

{choose-answers: 4}
? What are the goals for project organizational scheme?

C) Consistent, navigable, maintainable
C) Consistent, reduces errors, maintainable
o) Consistent, complicated, readable
o) Inconsistent, navigable, maintainable
m) Consistent, complicated file structure, maintainable
m) Inconsistent, error reduction, maintainable

{choose-answers: 4}
? What is true about project organization?

C) Typically best to aim for something that is organized but not too difficult to maintain
C) Best to strive for a schema that is organized but not too challenging to maintain
o) Best to aim for as complicated as possible
o) There is only one way that works best
m) Best to aim for as organized as possible
m) Best to aim for as easy as possible

{choose-answers: 4}
? What are some of the suggested organization tips?

C) All of the answers
C) All of the listed tips
o) Use informative names for files
o) Keep similar files together in a folder
m) Include a README file that explains what all the files are
m) number scripts in the order they are run (if more than one needs to be)

{choose-answers: 4}
? Why is the here package useful?

C) All of the listed reasons
C) All of the answers
o) When used with an .Rproj file all paths will start from the directory that contains that file
o) Makes it easier if you copy your files to a new computer, as you don't have to adjust paths
m) Makes it easier for others to take your files and not have to adapt the paths to use your code
m) Enables paths relative to the .Rproj file

## R Markdown Quiz

? What is an R Markdown file?

A) A special filetype that allows you to have your code and code output in the same file
b) A website where people store and share their code
c) A special filetype that allows you to mark down what code you want to keep
d) A special filetype that can only show the output of your code

? Why are R Markdown files good for reproducibility?
a) They allow you to add descriptions around your code to describe the steps of your process
B) They allow you to test the output of code to make sure it creates the result you expect
c) They allow you to share the code and the output of the code easily with others in one place
d) All of the above

? How do you create a new R Markdown file?
a) A new R Markdown file is automatically opened when you start RStudio
b) You right click the code in the console and save it
C) You click on the File tab to open a new R Markdown file which opens a new pane to write and test code in
d) You right click on the environment and save it


? Which of the following is NOT how you test the code in an R Markdown file?
A) You type code directly into the Console and forget to save it
b) You press the Knit button to test all of the code within the file (and nothing outside of the file!)
c) You use a keyboard shortcut to select and run lines of code
d) You can press the run previous chunks button to run the code for all chunks except the current chunk

? Which of the following is NOT true about R Markdown files?
a) You can choose to hide your code or the output of the code in the final rendered report
b) You can render the report into different kinds of file types like html or pdf by altering the YAML code at the top
c) You can modify the aesthetics of the report
D) R Markdown files only render the output of your code and never show your actual code

?
{/quiz}
38 changes: 38 additions & 0 deletions quizzes/quiz_ch6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

{quiz, id: rmarkdown, attempts: 10}

## R Markdown Quiz

? What is an R Markdown file?

A) A special filetype that allows you to have your code and code output in the same file
b) A website where people store and share their code
c) A special filetype that allows you to mark down what code you want to keep
d) A special filetype that can only show the output of your code

? Why are R Markdown files good for reproducibility?
a) They allow you to add descriptions around your code to describe the steps of your process
B) They allow you to test the output of code to make sure it creates the result you expect
c) They allow you to share the code and the output of the code easily with others in one place
d) All of the above

? How do you create a new R Markdown file?
a) A new R Markdown file is automatically opened when you start RStudio
b) You right click the code in the console and save it
C) You click on the File tab to open a new R Markdown file which opens a new pane to write and test code in
d) You right click on the environment and save it


? Which of the following is NOT how you test the code in an R Markdown file?
A) You type code directly into the Console and forget to save it
b) You press the Knit button to test all of the code within the file (and nothing outside of the file!)
c) You use a keyboard shortcut to select and run lines of code
d) You can press the run previous chunks button to run the code for all chunks except the current chunk

? Which of the following is NOT true about R Markdown files?
a) You can choose to hide your code or the output of the code in the final rendered report
b) You can render the report into different kinds of file types like html or pdf by altering the YAML code at the top
c) You can modify the aesthetics of the report
D) R Markdown files only render the output of your code and never show your actual code

{/quiz}
3 changes: 2 additions & 1 deletion resources/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ PII
ProjectTemplate
reproducibility
RStudio
README
rstudio
rmarkdown
Rmarkdown
RProj
Rproj
Sys
UE
UE5
Expand Down

0 comments on commit a656237

Please sign in to comment.