Summary¶
ggplot2uses a grammar of graphics for plotting-
ggplot2expects tidy data -
Using
ggplot2:
ggplot(data, aes(x = x, y = y)) + geom_point()
- Saving a
ggplot, directly after plotting:
ggsave("my_filename.png")
- R uses the arrow operator for assignment
my_variable <- 3.14
swirlcan be used as a tool to learn R
library(swirl)
swirl()
- Use
readrto load data from a file
library(tidyverse)
read_csv("my_data.csv")