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
# help | |
help(plot) | |
help(mtcars) | |
# mtcars | |
head(mtcars) | |
# variable info | |
str(mtcars) |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# Scatter Plot | |
p <- ggplot(mtcars) + |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# import data | |
ecom <- readr::read_csv('https://raw.githubusercontent.com/rsquaredacademy/datasets/master/web.csv') |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# import data | |
ecom <- readr::read_csv('https://raw.githubusercontent.com/rsquaredacademy/datasets/master/web.csv') |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# Dodge | |
ggplot(data = mtcars, aes(factor(cyl), fill = factor(vs))) + |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# Legend Title | |
ggplot(mtcars) + geom_point(aes(disp, mpg, color = factor(cyl))) + |
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
# install | |
install.pacakges('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# Plot | |
ggplot(mtcars) + |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# load | |
library(ggplot2) | |
library(readr) | |
# Plot | |
ggplot(mtcars) + |
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
# install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# library | |
library(ggplot2) | |
library(readr) | |
# Plot | |
ggplot(mtcars) + |
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
#install | |
install.packages('ggplot2') | |
install.packages('readr') | |
# library | |
library(ggplot2) | |
library(readr) | |
# Plot | |
ggplot(mtcars) + |