Skip to content

Commit

Permalink
Render Leanpub
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 3, 2025
1 parent b02ae40 commit 9f4a71c
Show file tree
Hide file tree
Showing 33 changed files with 499 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manuscript/1-Introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 1 Introduction

{type: iframe, title:1 Introduction, width:800, height:600, poster:resources/chapt_screen_images/introduction.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/introduction.html)



7 changes: 7 additions & 0 deletions manuscript/10-References.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 10 References

{type: iframe, title:10 References, width:800, height:600, poster:resources/chapt_screen_images/references.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/references.html)



7 changes: 7 additions & 0 deletions manuscript/2-R-for-Reproducibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 2 R for Reproducibility

{type: iframe, title:2 R for Reproducibility, width:800, height:600, poster:resources/chapt_screen_images/r-for-reproducibility.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/r-for-reproducibility.html)



7 changes: 7 additions & 0 deletions manuscript/3-Components-of-a-reproducible-analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 3 Components of a reproducible analysis

{type: iframe, title:3 Components of a reproducible analysis, width:800, height:600, poster:resources/chapt_screen_images/components-of-a-reproducible-analysis.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/components-of-a-reproducible-analysis.html)



7 changes: 7 additions & 0 deletions manuscript/4-A-Tour-of-RStudio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 4 A Tour of RStudio

{type: iframe, title:4 A Tour of RStudio, width:800, height:600, poster:resources/chapt_screen_images/a-tour-of-rstudio.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/a-tour-of-rstudio.html)



7 changes: 7 additions & 0 deletions manuscript/5-Setting-up-your-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 5 Setting up your project

{type: iframe, title:5 Setting up your project, width:800, height:600, poster:resources/chapt_screen_images/setting-up-your-project.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/setting-up-your-project.html)



7 changes: 7 additions & 0 deletions manuscript/6-Reproducible-Reports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 6 Reproducible Reports

{type: iframe, title:6 Reproducible Reports, width:800, height:600, poster:resources/chapt_screen_images/reproducible-reports.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/reproducible-reports.html)



7 changes: 7 additions & 0 deletions manuscript/7-Reproducible-Code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 7 Reproducible Code

{type: iframe, title:7 Reproducible Code, width:800, height:600, poster:resources/chapt_screen_images/reproducible-code.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/reproducible-code.html)



7 changes: 7 additions & 0 deletions manuscript/8-Using-GitHub-in-a-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 8 Using GitHub in a workflow

{type: iframe, title:8 Using GitHub in a workflow, width:800, height:600, poster:resources/chapt_screen_images/using-github-in-a-workflow.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/using-github-in-a-workflow.html)



7 changes: 7 additions & 0 deletions manuscript/9-Software-versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 9 Software versions

{type: iframe, title:9 Software versions, width:800, height:600, poster:resources/chapt_screen_images/software-versions.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/software-versions.html)



7 changes: 7 additions & 0 deletions manuscript/About-the-Authors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# About the Authors

{type: iframe, title:About the Authors, width:800, height:600, poster:resources/chapt_screen_images/about-the-authors.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/about-the-authors.html)



7 changes: 7 additions & 0 deletions manuscript/About-this-Course.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# About this Course

{type: iframe, title:About this Course, width:800, height:600, poster:resources/chapt_screen_images/index.png}
![](https://hutchdatascience.org/Tools_for_Reproducible_Workflows_in_R/index.html)



20 changes: 20 additions & 0 deletions manuscript/Book.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
1-Introduction.md
2-R-for-Reproducibility.md
quiz_ch2.md
3-Components-of-a-reproducible-analysis.md
quiz_ch3.md
4-A-Tour-of-RStudio.md
quiz_ch4.md
5-Setting-up-your-project.md
quiz_ch5.md
6-Reproducible-Reports.md
quiz_ch6.md
7-Reproducible-Code.md
quiz_ch7.md
8-Using-GitHub-in-a-workflow.md
quiz_ch8.md
9-Software-versions.md
quiz_ch9.md
10-References.md
About-this-Course.md
About-the-Authors.md
54 changes: 54 additions & 0 deletions manuscript/quiz_ch2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

{quiz, id: why_r, attempts: 10}

## What is R?

{choose-answers: 4}
? What is R?

C) A language for working with data
C) A statistical programming language
o) A set of code that allows you to do various things
o) Code for specifically making maps
m) A type of programming notation
m) A language specifically for creating websites

{choose-answers: 4}
? What does "open source" mean?

C) The code is publicly available and others are able to contribute to it
C) The code is available to the public and other people can make suggestions about it
o) The code is only available to a select few users
o) The code is only available to users with a GitHub account
m) The code is hidden and can't be accessed by users
m) The code is open for viewing but not modification

{choose-answers: 4}
? What is an R package?
C) A set of code that can be shared between users
C) Code that can be shared with others, either privately or publicly
o) A way to make your code more complicated
o) A way to make your code more efficient
m) A way to protect your code from being seen by others
m) A type of statistical analysis

{choose-answers: 4}
? What is one benefit of having a rich and active community in R?
C) More resources for finding help and tutorials
C) More opportunities to find others who can help you make your code reproducible
o) More opportunities to make your code more complicated
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

{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}
57 changes: 57 additions & 0 deletions manuscript/quiz_ch3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

{quiz, id: components, attempts: 10}

## Components of reproducibility

{choose-answers: 4}
? What does "reproducibility on a continuum" mean?

C) Reproducibility that needs iterative work to improve
C) Reproducibility that improves over time through iterations
o) Reproducibility that is dependent on the researcher's expertise
o) Reproducibility that is achievable only for certain types of analyses
m) Reproducibility that can only be achieved with perfect execution
m) Reproducibility that allows everyone everywhere to get the exact same results with your code and data

{choose-answers: 4}
? Which of the following is not a component of reproducibility?

C) Efficiency
C) Speed
o) Transparency
o) Clarity
m) Accessibility
m) Consistency

{choose-answers: 4}
? What does "open source" mean in the context of reproducibility?

C) Making data and code available for anyone to access and modify
C) Providing access to the data and code publicly where possible
o) Providing data and code upon request by email
o) Publishing data and code behind a paywall
m) Storing data and code on a personal computer
m) Not keeping the code for an analysis

{choose-answers: 4}
? Why is data sharing important in making an analysis open source?

C) It helps others be able to truly reproduce the analysis by using the same data
C) It helps other people to be able to reproduce the analysis, as they need to attempt the analysis with your data to do so
o) It makes the analysis more complex and difficult to execute
o) It makes it less clear what was done in our analyses
m) It helps others to be able to publish conclusions about our data
m) It exposes personal identifiable information to the public

{choose-answers: 4}
? Which of the following is correct about this statement - if your data has protected data that you cannot make your analysis open source or reproducible.

C) These are not mutually exclusive goals! Some thoughtful planning and use of controlled access methods can ensure that all individuals' data are well protected!
C) You can protect data and not share it, but share the code in a careful manner that does not expose details about the data.
o) You can make your analysis reproducible but not open source
o) You can make your analysis open source but not reproducible
m) There are no methods that will allow you to share your methods and data in a safe way.
m) Sharing your code is always unsafe when it comes to protected data


{/quiz}
41 changes: 41 additions & 0 deletions manuscript/quiz_ch4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

{quiz, id: rstudio, attempts: 10}

## RStudio Quiz

? What is RStudio?

A) A computing environment for writing code in R
b) A specific piece of code that performs a task
c) The Comprehensive R Archive Network
d) The libraries needed to use R code on your computer

? What is a function in R?

a) An object in R
b) A computing environment for writing code in R
C) A specific piece of code that performs a task
d) A Comprehensive R Archive Network

? What is the purpose of an IDE in programming?

a) It helps to complete what you have written
b) It suggests package names or functions
c) It allows you to view the output of your code
D) All of the above

? What is the Editor pane in RStudio used for?

a) Looking for what objects are saved
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?

a) To test code
b) To write code in the Console
C) To have the code for your analysis, the output from the analysis, and your written thoughts and rationale for your analysis all in one place
d) To run code in parallel

{/quiz}
56 changes: 56 additions & 0 deletions manuscript/quiz_ch5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

{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

{/quiz}
38 changes: 38 additions & 0 deletions manuscript/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}
Loading

0 comments on commit 9f4a71c

Please sign in to comment.