ggplot2pipes

suppressPackageStartupMessages({
  library(dplyr)
  library(ggplot2)

  library(ggplot2pipes)
})

knitr::opts_chunk$set(echo = TRUE)

ggplot2pipes is a package for creating pipe-enabled versions of ggplot2 functions.

Basic Usage

  1. Call init_ggplot2_pipes() to create all the pipe-enabled functions
  2. Use the new functions with dplyr/magrittr pipes
library(dplyr)
library(ggplot2)
library(ggplot2pipes)

init_ggplot2_pipes()

ggplot(mtcars) %>%
  add_geom_line(aes(mpg, wt)) %>%
  add_labs(title="hello") %>%
  add_theme_bw() %>%
  add_facet_wrap(~am)


coolbutuseless/ggplot2pipes documentation built on May 14, 2019, 6:09 a.m.