\clearpage
The example is from: https://github.com/tidyverse/ggplot2.
library("ggplot2") ggplot(mpg, aes(displ, hwy, colour = class)) + geom_point()
The examples are from: https://github.com/tidyverse/tibble.
library("tibble") as_tibble(iris) tibble(x = 1:5, y = 1, z = x ^ 2 + y) tribble( ~x, ~y, ~z, "a", 2, 3.6, "b", 1, 8.5)
The example is from: https://github.com/tidyverse/purrr.
library("purrr") mtcars %>% split(.$cyl) %>% # from base R map(~ lm(mpg ~ wt, data = .)) %>% map(summary) %>% map_dbl("r.squared")
The examples are from: https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html.
library("dplyr") library("nycflights13") filter(flights, month == 1, day == 1) slice(flights, 1:10) arrange(flights, year, month, day) select(flights, year, month, day) mutate(flights, gain = arr_delay - dep_delay, speed = distance / air_time * 60) summarise(flights, delay = mean(dep_delay, na.rm = TRUE))
The R session information for compiling this document is shown below.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.