1. Install R and RStudio

2. Open RStudio

It should look like this when you do:

3. Install additional packages and data

install.packages("tidyverse")
install.packages("devtools")
library(devtools)
install_github("thisisdaryn/workshop")
install.packages("nycflights13")

4. Test it out

Copy-paste the following text into the command window and hit enter.

library(forcats)
library(ggplot2)
library(workshop)
library(tidyr)
library(dplyr)

lara_tests <- separate(lara, Match, into = c("Format", "Matchnum")) %>% 
  filter(Format == "Test")
ggplot(lara_tests, aes(x = fct_reorder(Opp, Runs, .fun = sum, na.rm = TRUE, .desc = TRUE), y = Runs)) + 
  geom_bar(stat = "identity", fill = "royalblue") +
  xlab("Opponent") + ggtitle("Brian Lara Test Career (1990 - 2006)")


thisisdaryn/workshop documentation built on Jan. 17, 2020, 7:31 p.m.