+.gg {ggghost}R Documentation

Add a New ggplot Component to a ggghost Object

Description

This operator allows you to add objects to a ggghost object in the style of @hrbrmstr.

Usage

## S3 method for class 'gg'
e1 + e2

Arguments

e1

An object of class ggghost

e2

A component to add to e1

Value

Appends the e2 call to the ggghost structure

Examples

#' ## create a ggghost object
tmpdata <- data.frame(x = 1:100, y = rnorm(100))

z %g<% ggplot(tmpdata, aes(x,y))
z <- z + geom_point(col = "steelblue")
z <- z + theme_bw()
z <- z + labs(title = "My cool ggplot")
z <- z + labs(x = "x axis", y = "y axis")
z <- z + geom_smooth()

[Package ggghost version 0.2.1 Index]