Summary and Setup
This workshop explores the powerful combination of Quarto and RStudio to author scientific publications. Our aim is to enhance researchers’ adoption of open and reproducible practices while improving their project and data management skills. This workshop is structured into three modules. The modular format encourages instructors to view the workshop as a comprehensive but flexible curriculum, allowing them to focus on specific areas of interest. Recognizing variations in proficiency levels and familiarity with RStudio among learners, we have designed this workshop to be flexible, allowing for the abbreviation or skipping of episodes to cater to specific needs:
Module 1 - Reproducibility and Project Organization: This module consists of two episodes introducing learners to reproducible research and project management fundamentals. It lays the groundwork for a robust and transparent workflow, ensuring that all participants, whether beginners or those seeking a refresher, are on the same page before delving into the specifics of Quarto and RStudio Posit.
Module 2 - Quarto and RStudio: This module focuses on Quarto and its features for creating dynamic and reproducible documents. We guide learners through the ins and outs of Quarto, helping them harness this authoring framework and tool potential to create visually appealing, easily reproducible, and shareable documents.
Module 3 - Collaboration: This module shifts the focus to collaboration and publishing. It explores effective collaboration with others, using version control within RStudio, pushing local changes to a remote repository, managing dependencies for R/Quarto projects, and sharing reproducible research with a wider audience.
Prerequisites:
Experience in R/RStudio is recommended but not required. Experience, if not familiarity, with using your Unix Shell Terminal, and Version Control with Git is required. You will need a GitHub Account to fork and pull the example repo.
PART I:Install Git and create GitHub Account
We will need the following account(s) and software for this workshop:
- Create Github account (use existing or create new account)
- Install Git
- Install R & RStudio (Two separate installations: if you are on a windows device, you may need Rtools)
{% include install_instructions/github.html %}
{% include install_instructions/git.html %}
PART II: Install R/Rstudio and Quarto
{% include install_instructions/r.html %}
Quarto
Quarto is a scientific and technical publishing system build on Pandoc, which we will be using in Rstudio. You will need to install Quarto from Quarto.org. Open the Setup Wizard to begin the install. Keep the defaults and select Next until the install finishes.
Version clarifications on Quarto and R/Rstudio
If you already have Rstudio and R installed, please check if you have the most updated 2023.06 Rstudio and at least R version 4.3, along with Quarto version 1.3.45. The quarto document will not render without the most updated versions. The Quarto Package is not the CLI
You can check if you have the correct Quarto version by typing the following in the Rstudio terminal:
quarto --version
Your output should be:
OUTPUT
quarto --version
1.4
R Packages
Install the following packages in RStudio: rmarkdown
,
tidyverse
,BayesFactor
, patchwork
.
We will be covering the purpose of using packages and recap different
ways to install and manage them in RStudio. Nonetheless,
pre-installating the packages we will be using for this workshop will
save us some precious time since installation time may vary among
learners. Here are the steps for two possible approaches you may follow
for completing this process:
Using Menus and Tabs
Open R studio
Select from the upper menu
Tools > Install packages...
or click on thePackages
tab in the bottom-right section and then click on install. Either action will prompt a box dialog.In the
Install Packages
dialog box, copy this commandrmarkdown, tidyverse, BayesFactor, patchwork
under the Packages field, make sure the optioninstall dependencies
is selected, keep other information unchanged, and then clickinstall
.Don’t be alarmed by the stop sign that will blink (and do not click on it otherwise you will cancel the process) or the red text messages. Once the process completes the cursor will be preceeded by a greater-than sign
>
.Copy and paste one of the following functions to the console and wait for the process to complete:
install.packages("rmarkdown")
install.packages("tidyverse")
install.packages("BayesFactor")
install.packages("patchwork")
or
install.packages(c("rmarkdown", "tidyverse", "BayesFactor", "patchwork"))