Example R notebook¶
More info here: https://irkernel.github.io/
In [1]:
options(repr.plot.width = 8, repr.plot.height = 6, repr.plot.res = 200)
In [2]:
x <- seq(0, 2*pi, .1)
y <- sin(x)
plot(x, y, type="l")
Tidyverse¶
In [3]:
library(tidyverse)
Registered S3 methods overwritten by 'ggplot2': method from [.quosures rlang c.quosures rlang print.quosures rlang Registered S3 method overwritten by 'rvest': method from read_xml.response xml2 ── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ── ✔ ggplot2 3.1.1 ✔ purrr 0.3.2 ✔ tibble 2.1.1 ✔ dplyr 0.8.0.1 ✔ tidyr 0.8.3 ✔ stringr 1.4.0 ✔ readr 1.3.1 ✔ forcats 0.4.0 ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag()
Documentation:
- Tidyverse
- R for Data Science (2e) (online book)
- Tidy Modeling with R (online book)
In [4]:
ggplot(data = mpg) +
geom_point(mapping = aes(x = displ, y = hwy, color = class))