Thank you for participating. The course materials will remain online indefinitely.
All sessions will take place in FXB G-12 from 2-3:30 pm.
View the slides here (or download as pdf)
Download the scripts and data here.
If you’re having trouble with R on your own machine, click this link and sign up for a free RStudio cloud account. You’ll be able to access all the materials directly.
Some ggplot2
resources mentioned in the slides:
You can watch a video of class here.
Download the solution scripts.
View the slides here (or download as pdf).
Download the scripts and data here.
Open the project in RStudio Cloud here.
Resources:
forcats
cheat sheetYou can watch a video of class here.
Download the solution script.
View the slides here (or download as pdf).
Download the scripts and data here.
Open the project in RStudio Cloud here.
Resources:
dplyr
package. Read its vignette here.You can watch a video of class here.
Download the solution script.
View the slides here (or download as pdf).
Download the scripts and data here.
Open the project in RStudio Cloud here.
Resources:
apply()
family of functionsmap()
family of functionsYou can watch a video of class here. (The first ~10 minutes are from an earlier presentation that went over; just skip ahead.)
Download the solution script.
View the slides here (or download as pdf).
Download the scripts and data here.
Open the project in RStudio Cloud here.
Resources (other packages I like but didn’t mention):
rmarkdown
: I write most of my documents (manuscripts, slides, homeworks) in RMarkdown. I couldn’t live without it. (https://rmarkdown.rstudio.com)lubridate
: Work with dates and times really easily. (https://lubridate.tidyverse.org)janitor
: Helps clean variable names, etc. (http://sfirke.github.io/janitor/)furrr
: Speed up your code with parallel processing. (https://davisvaughan.github.io/furrr/)shiny
: Make interactive apps. I made http://selection-bias.louisahsmith.com in shiny. (http://shiny.rstudio.com)drake
: Pipeline for analysis. (https://docs.ropensci.org/drake)rvest
: Scrape data from websites. (https://rvest.tidyverse.org)You can watch a video of class here.
The font you saw in my RStudio is Fira Code. Instructions to install can be found here.
Beyond the themes that come pre-installed with RStudio, there are a variety of others available with the rsthemes
package here.
You can also make your own theme! There’s more information in this article.
If you use certain headers like # ----
in your code, your code sections will be automatically labeled and you can use the outline viewer (the rightmost button direct above your script) or the section selector (bottom left of the script section). Read more here.
Introduction to R by Louisa H. Smith (including all of the materials on this site) is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.