Session 1: R Markdown and GitHub
What is R Markdown? R Markdown is a framework to create documents in R. One main reason to use R Markdown is to share your R analyses in a reproducible and dynamic report. Many researchers create an R Markdown document to accompany their publications, in order to promote open data and transparent reporting.
Watch the 1-minute video What is R Markdown? from RStudio, Inc. on Vimeo for a quick explanation on R Markdown.
What is Distill? Distill is a web publishing format specifically created for R Markdown documents. This is one of the simplest ways to turn your R Markdown documents into (pre)webpages. There many different formats (i.e., Hugo, bookdown), but Distill is a very stable format which require less maintenance and is easy to learn.
Read this article on how to create a website in Distill.
What is Github? GitHub is a platform to store, track, and collaborate on software projects. In our CDS Hackathon events, we use GitHub to jointly work on a data analytic project.
Watch the 3-minute video What is GitHub? from GitHub on Youtube for a quick explanation on R Markdown.
Your assignment is to create your own website on R Markdown using Distill and host it on GitHub. Creating the basic website will take you less than an hour, but personalizing it will take you longer. Give yourself an additional 10-20 hours to complete your website according to the requirements below. We expect you to have your website ready for the midterm meeting with your supervisor.
install.packages(c("distill", "rmarkdown", "postcards"))
Create your basic website template by following the instructions on our BEACON 2022 Workshop website. Make sure to create your website with Version 2.
Personalize your website! Your website should contain the following pages:
kable
function and a plot using ggplot2
.
Tip 2: Check out this chapter on R Markdown in R for Data Science. They use other formats to process and publish, but they have a great explanation and some exercises as well!Feel free to add any customizations you want on your website. You can play around with changing the template (i.e., changing themes) or adding emojis 😃.
Tip 3: Download the R Markdown Cheatsheet for an overview of commands!