Download R @ The R Project’s Home Page
Download RStudio Desktop from RStudio
Run the installers for R and RStudio, in that order.
It should look like this when you do:
install.packages("tidyverse") install.packages("devtools") library(devtools) install_github("thisisdaryn/workshop") install.packages("nycflights13")
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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.