unggplot: Returns the data from the ggplot

Description Usage Arguments Value Examples

View source: R/aa.R

Description

Returns the data frame from the gplt object

Usage

1
unggplot(gplt, layer = NULL)

Arguments

gplt

A ggplot object

layer

ggplot plots can include different data in other layers. This is the index of the layer to return (by default the global data is returned)

Value

a data frame

Examples

1
2
3
4
5
6
data(iris)
ggplot(iris) %>%
  geom_point(aes(x = Sepal.Length, y = Sepal.Width, color = Species)) %>%
  ggsave("demo.png") %>%
  unggplot() %>%
  head()

zeehio/ggpipe documentation built on May 29, 2019, 12:19 p.m.