An Intro to R
/Tidyverse
Overview | Learning Objectives | Setup | Credits | Contact | Additional Resources
Next workshop
-
2025: Sep 12 / Sep 19 w/ R-Ladies Aurora and PATH-GREU program co-hosted with Harriet Dashnow
Past workshops
- 2022: International Society for Computational Biology, ISCB Academy Tutorial
- 2021: R-Ladies Tunis, Africa - 2021: R-Ladies Bangalore, India
- 2019: Indian Institute of Technology Madras (IITM) Chennai, India (w/ Praveena Mathews)
- 2019–2022: PBGB R seminar course (Spring of ‘19, ‘20, ‘22), Michigan State University
- Other related ones: R-Ladies East Lansing
Overview
This repo contains the workshop material for using R/tidyverse to analyze & visualize diverse datasets, e.g., transcriptomics & gapminder [material: transcriptomics, gapminder].
- Part 1: Getting started w/
readr
- Installation and Setup | Cheatsheets
- Loading packages
- Data import
- Knowing your data: basic data exploration
- Part 2: Reshaping data w/
tidyr
- Gather, Spread
- Unite, Separate
- Part 3: Data wrangling w/
dplyr
- Filter, Select
- Mutate
- Distinct and Arrange
- Group_by and Summarize
- More data wrangling
- Part 4: Visualizing tidy data w/
ggplot
- Basics of ggplot
- Barplots and histograms
- Scatter plots
- Boxplots and violin plots
- Some data sleuthing!
- Part 5. Export and Wrap-up w/
rmarkdown
- Saving your plots
- Saving your data files
- Summary of everything that you learnt in the workshop!
Learning Objectives
By the end of this workshop, you will be able to load your genomic
dataset, perform basic data tidying & wrangling, data visualization, and
save/export your results using tidyverse
! Hopefully, you will also
have a newfound appreciation for reproducible research and R!
Setup
Before the Workshop Begins
- Install the following software if you don’t yet have them. If you do
have these installed, skip to #2:
- R version
3.6+
(Current:4.2.0
) | Download R - RStudio version
1.3+
(Current:2022.02.2-485
) | Download RStudio OR use RStudio Cloud
- R version
- Ensure that your version of R is
4.4+
. The latest version is4.5.1
. To check your R version, type in your console:version
- Check your RStudio version. It should be
2025.05.1+513
or close! Open RStudio. In the top menu bar, click: RStudio > About RStudio > - Install tidyverse, here, gapminder (not needed for
transcriptomics workshop), gganimate:
install.packages(c("tidyverse", "here", "gapminder"))
devtools::install_github(‘thomasp85/gganimate’)
- Access useful Cheatsheets here.
Other Resources: Software Carpentry Video Tutorial for installing R and R Studio
For Windows Users
Video Tutorial
Install R by downloading and running this .exe
file from
CRAN. Also,
please install the RStudio
IDE. Note
that if you have separate user and admin accounts, you should run the
installers as administrator (right-click on .exe
file and select “Run as
administrator” instead of double-clicking). Otherwise, problems may occur
later, for example, when installing R packages.
For Mac Users
Video Tutorial Install R
by downloading and running this .pkg
file from
CRAN. Also, please
install the RStudio
IDE.
For Linux Users
You can download the binary files for your distribution from
CRAN. Or you can use your
package manager (e.g. for Debian/Ubuntu run
sudo apt-get install r-base
and for Fedora run sudo dnf install R
).
Also, please install the RStudio
IDE.
Credits
Arjun Krishnan and
I co-developed the content for the
transcriptomics part for this workshop; R-Ladies East
Lansing members (Kayla J,
Nafiseh H, Veronica F, Cara F, Camille A) and I helped with the
gapminder
material.
Acknowledgements
- Krishnan Lab | JRaviLab
- R-Ladies East Lansing, incl. Nafiseh Haghtalab, Kayla Johnson, Veronica Frans, Cara Feldscher, Camille Archer
- R-Ladies Aurora | R-Ladies Chennai | R-Ladies Bangalore | R-Ladies Tunis
License
This work is licensed under a BSD-3-Clause License.
Contributing
- If you like it, leave your star in this project 🌟
- If you would like to suggest/contribute to this project, or request similar ones, feel free to open an issue 💟
- Please follow our contributing guidelines (coming soon!).
Contact
- Webpage: jravilab.github.io | thekrishnanlab.org | github.com/rladies-eastlansing
- Email: janani.ravi\@cuanschutz.edu | arjun.krishnan\@cuanschutz.edu
- GitHub: \@jananiravi | \@arjunkrish | \@RLadies-EastLansing
Additional resources
- You can access all relevant material pertaining to this workshop here.
- Other related RLA | RLEL workshops & useful cheatsheets.
- Computational Biology/Bioinformatics Resources collated by Arjun and Janani.
- Data-to-viz.com & R Graph Gallery | Python Graph Gallery
Some awesome open-source books
- R for Data Science: Wickham & Grolemund #R4DS https://r4ds.had.co.nz
- Hands-On Programming with R: Grolemund #HOPR https://rstudio-education.github.io/hopr
- R Programming for Data Science: Peng https://leanpub.com/rprogramming
- Learning Statistics with R: Navarro https://learningstatisticswithr.com/book