Skip to content

Latest commit

 

History

History
202 lines (163 loc) · 8.17 KB

README.md

File metadata and controls

202 lines (163 loc) · 8.17 KB

An Intro to R/Tidyverse

License

Overview | Learning Objectives | Setup | Credits | Contact | Additional Resources

Next workshop

  • TBD

Past workshops

Videos


Overview

This repo contains the workshop material for using R/tidyverse to analyze & visualize diverse datasets, e.g., transcriptomics, gapminder | as HTML (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

  1. Install the following software if you don't yet have them. If you do have these installed, skip to #2:
    1. R version 3.6+ (Current: 4.2.0) | Download R
    2. RStudio version 1.3+ (Current: 2022.02.2-485) | Download RStudio OR use RStudio Cloud
  2. Ensure that your version of R is 3.6+. The latest version is 4.2.0. To check your R version, type in your console: version
  3. Check your RStudio version. It should be v1.3+ Open RStudio. In the top menu bar click: RStudio > About RStudio >
  4. Install tidyverse, here, gapminder (not needed for transcriptomics workshop), gganimate:
    install.packages(c("tidyverse", "here", "gapminder"))
    devtools::install_github(‘thomasp85/gganimate’)
  5. 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

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, feel free to open a issue 💟
  • Please follow our contributing guidelines (coming soon!).

Contact


Additional resources

Some awesome open-source books