This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R source code for all slides/videos in Albert Y. Kim's "Modeling with Data in | |
# the Tidyverse" DataCamp course: | |
# https://www.datacamp.com/courses/modeling-with-data-in-the-tidyverse | |
# This code is available at http://bit.ly/modeling_tidyverse | |
# Load all necessary packages ----- | |
library(ggplot2) | |
library(dplyr) | |
library(moderndive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(gapminder) | |
library(ggplot2) | |
library(gganimate) | |
p <- ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) + | |
geom_point(alpha = 0.7) + | |
scale_colour_manual(values = country_colors) + | |
scale_size(range = c(2, 12)) + | |
scale_x_log10() + | |
facet_wrap(~continent) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://stackoverflow.com/a/7267364/1036500 by Andrie de Vries | |
# This is it: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5)) | |
library(ggplot2) | |
td <- expand.grid( | |
hjust=c(0, 0.5, 1), | |
vjust=c(0, 0.5, 1), | |
angle=c(0, 45, 90), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |