knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Build Status CRAN_Status_Badge

ggloop

Create ggplot2 plots in a loop.

Overview

ggloop allows the user to use create multiple 'ggplot2' plots. Plots are created by passing multiple aesthetics via a vector of aesthetics to ggloop(). Users can use both dplyr-like syntax (i.e. x = mpg:hp, y = 1, color = 4:8, etc) and ggplot2-like syntax (i.e x = mpg/cyl, y = wt + hp, color = factor(cyl), etc).

Installation

## CRAN
install.packages("ggloop")

## GitHub
devtools::install_github("seasmith/ggloop")  

Where can I learn how to use ggloop?

You can see ggloop in action with the intro vignette (vignette("intro", "ggloop")). You can also see the example and the very brief overview available below.

A simple example

library(ggloop)
library(ggplot2)
g <- ggloop(data = mtcars, 
            mappings = aes_loop(x = c(mpg:hp, mpg/cyl), 
                                y = c(hp:mpg, disp/hp),
                                color = gear), 
            remap_xy = FALSE)
g <- g + geom_point()
g$color.gear$x.mpg_y.hp

The functions

ggloop has three exported functions:



seasmith/ggloop documentation built on May 29, 2019, 4:56 p.m.