This lesson is in the early stages of development (Alpha version)

Introduction to Reproducible Publications with RStudio

Participants will build on their research and analytical skills with R Studio by learning how to create reproducible documents that combine code, analysis and narrative. RStudio makes it possible to work on a complete research project in a more efficient, integrated and organized manner: from data upload, cleaning, and analysis, to writing and styling a manuscript in markdown. It allows users to add code, figures, citations, and bibliography, as well as to generate outputs in various formats (e.g., html, pdf, doc). Rstudio also connects with Git and Github and learners will have a chance to experiment with this integration and understand its advantages for collaboration and version control. This workshop will involve lectures and demos alternating with hands-on exercises and challenges, so by the end of the workshop, learners will have “authored” a reproducible paper of your own with the data and narrative we provide.

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.

Schedule

Setup Download files required for the lesson
Day 1 00:00 1. Scientific reproducibility: What is it for? What is reproducible research?
How can RStudio help research to be more reproducible?
What are the benefits of using RStudio for writing academic essays and papers?
00:10 2. Good Practices for Managing Projects in RStudio What are good research project management practices?
What is an R Project file?
How do you start a new R Project or open an existing one?
How do you use version control to keep track of your work?
00:40 3. Navigating RStudio and Quarto Documents How do you find your way around RStudio?
How do you start a Quarto document in Rstudio?
How is a Quarto document configured, and how do I work with it?
01:00 4. Working with projects in RStudio How do I start or continue a project with Git versioning?
What are the features in the RStudio Interface for working with Git?
What are the basics of the Git versioning workflow?
01:30 5. Introduction to Working with Quarto documents What is Quarto?
What is the breakdown of a Quarto document?
How can you render the input file to the specified output format?
01:55 6. Writing and Styling Qmd Documents What is the Visual Editor in RStudio?
Which features does the Visual Editor have?
How can I can apply styling and formatting to Qmd documents in Rstudio more easily?
How to add inline code?
02:15 7. Adding Code to Quarto Documents What is Knitr and how it works?
What are code chunks, and how are they structured?
How do you add and run code chunks?
How can I avoid issues with relative paths?
02:45 Finish
Day 2 00:00 8. Rendering & Customizing Code Outputs How do you render code in Quarto documents?
How do you apply code chunk options at the document level to customize your code?
How do you label and caption code chunks?
What is inline code and when should it be used?
00:30 9. Advanced Code Chunk Options How do you apply global options at the project level?
How do you globally load data and packages?
How do you run code from an external script in a code chunk?
How do I run external scripts in a Quarto document?
00:50 10. Bibliography, Citations & Cross-Referencing How can you insert citations to your manuscripts using RStudio’s visual editor?
How can you change citation styles?
What are the options to display cited and uncited bibliography?
How can you cross-reference content?
01:25 11. Using Git in RStudio How do I use version control in RStudio?
How do I track and commit changes?
01:40 12. Collaborating via GitHub How do I authenticate with GitHub?
How do I put my project on GitHub?
How do I "push" my latest changes to GitHub?
02:15 13. Managing Dependencies in R/RStudio How can I avoid the dependency hell problem and make my code reproducible in the future?
How can I document my computational environment?
How can I manage package and software dependencies in RStudio?
02:35 14. Publishing your project What are the options for you to publish your project?
What free and open publishing resources are available?
What aspects should guide your choice?
How can you create qmd documents using journal templates?
02:45 15. Creating and sharing reproducible environments with renv How can I manage package and software dependencies in RStudio?
What is the renv package and how it works?
03:15 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.