Click on the link to go to R's homepage. https://www.r-project.org/
To download R:
- Click the download R link under Getting Started.
- Select your CRAN mirror. Click one of the links at the top under 0-Cloud.
- Click on the link that says "Download R for [Your Operating System]"
- What to Pick
- For Mac, select the latest release
- For Windows, select base
- For Linux, select your distribution and follow the instructions in the README.html file.
- R should be downloaded to your computer and you should follow the normal steps to install
Click on the link to go to R's homepage. https://www.rstudio.com/
To download RStudio:
- Click the Download link underneath the RStudio cartoon.
- Click the DOWNLOAD button for the FREE RStudio Desktop.
- Select your operating system from the list.
- The file should download to your computer and then you can install it like any other program.
To install the main packages that will be required for meetups, open RStudio and copy and paste the code below into the Console.
install.packages(c('tidyverse', 'viridis', 'conflicted'))
If that doesn't work, copy and paste this code.
packages <- c('dplyr', 'forcats', 'ggplot2', 'purrr', 'readr', 'stringr', 'tibble', 'tidyr', 'viridis', 'conflicted')
install.packages(packages)
TeX is a computer language/program for typesetting, particulary for math and other technical typesetting. RStudio needs it installed on your computer in order to create PDFs from your R markdown documents. To install, follow the instructions for your operating system below.
Mac:
- To install MacTeX, go here http://www.tug.org/mactex/
- Click on MacTeX Download
- Click on MacTeX.pkg
- Install like any other program
Note: If you have RStudio open, you'll need to restart before you can knit a PDF.
Windows:
- To install MiKTeX, go here https://miktex.org/download
- Click Download
- Execute the .exe files like normal
- During installation select the options below. Otherwise install as you normally do.
- Install MiKTeX for anyone who uses the computer.
- Install missing packages on-the-fly: Yes
Note: If you have RStudio open, you'll need to restart before you can knit a PDF.
Linux:
In terminal sudo apt-get install texlive-full
Note: If you have RStudio open, you'll need to restart before you can knit a PDF.
Reference material used while creating material for meetups:
- R for Data Science by Hadley Wickham
- Advanced R by Hadley Wickham
- Temple's BIO5312, Biostatistics Fall 2017 by Stephanie Spielman
Introduction to the class and Rmarkdown
- Introduction to meetups
- Getting started with R and RStudio
- Rmarkdown
Materials
- slides
- Introduction to Rmarkdown in Rmd, html, word document, and pdf
- Practice for the week is here and answers are here in R markdown and in html
References
Subsetting and filtering
- Examining tables
- Subsetting
- Filtering and Selecting
Materials
- Demo in Rmd and in html
- Practice for the week is here and answers are here in Rmd and in html
Plotting with ggplot
- Background on ggplot and review data types
- ggplot demonstration
Materials
- slides
- ggplot demo Rmd file, html
- updated demo file with extras discussed in meetup, Rmd file, html
- Practice for the week is here and answers are here in Rmd and in html and in class review is here
References
- ggplot cheatsheet
- viridis vignette
- ggbeeswarm vignette/GitHub README
- list of ggplot themes
- list of colors you can plot with in R
No meetup the week of Sep 28 because of thesis defense
Data manipulation with dplyr
- dplyr functions
- piping
Materials
- dplyr demo Rmd file, html file
- dplyr demo with in class extras Rmd file
- practice Rmd and answers in Rmd and in html and answer Rmd with in class solutions and extra comments
References
Data Wrangling with tidyr
- the tidyverse
- tidy data
- data wrangling
- tidyr functions
- binds and joins
- dealing with NAs
Materials
- slides
- data wrangling demo Rmd, html
- tidyr/data wrangling demo with in class additions Rmd
- data wrangling practice and answers in Rmd and in html and in-class answers in Rmd
References
- data wrangling cheat sheet
- Hadley Wickhams tidy data paper
Basic Statistics in R
- descriptive and summary statistics
- hypothesis testing
- t test
- chi squared
- tidying the test
- correcting for multiple testing
Materials
Import/Export Data and Review
- read/write data
- combine skills from all weeks
Materials
- slides
- demo Rmd, html, and the in-class Rmd
- practice Rmd and answers in Rmd and in html and from class in Rmd
- practice datasets
References
- data import cheat sheet
Linear Modeling and tidying models with broom
- Review correlation and linear regression
- Linear modeling functions
- broom
Materials
- slides
- demo Rmd and in class demo Rmd
- practice Rmd and html and answers in Rmd and in html and in class review Rmd
References
Clustering
- Review linear modeling and broom
- clustering
- kmeans
- PCA
- tSNE
Materials
- slides
- demo Rmd and in class demo in Rmd
- practice in Rmd and in html and answers in Rmd and in html and the in class review
- practice datasets
Plotting grab bag
- Review clustering
- miscellaneous plots
- cowplot
- volcano plot
- MA plot
Materials
References
- cowplot vignette
Hierarchical Clustering
- How does hierarchical clustering (broadly) work?
- Calculate clustering
- Plot clustering
Materials
References
- ggdendro vignette
- ggplot extensions gallery
Heatmaps
- Making heatmaps with
pheatmap()
- appearance
- clustering
geom_tile()
Materials
- demo Rmd and html and in class demo Rmd
- demo data
- 2018.01.03 heatmap follow up
References
- pheatmap vignette
NO meetups Dec 21, Dec 28, or Jan 4. Happy break!
2019.01.09 Meetups indefinitely suspended
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.