gg_tex: Wraps ggplot as Latex Objects

Description Usage Arguments Examples

View source: R/gg_tex.R

Description

gg_tex allows ggplots to be included in automated Latex appendixes constructing through appendize.

Usage

1
gg_tex(ggOb, label, caption = "Figure")

Arguments

ggOb

A ggplot.

label

Intended Latex label for plot figure.

caption

Intended Latex title for plot figure.

Examples

1
2
3
4
5
library(ggplot2)
df <- data.frame("first" = c(4,5,6), "second" = c(7,5,3))
g <- ggplot(data=df) + geom_point(aes(x=first, y=second))
# function commented to suppressing saving to local drive
# rchitex::appendize(gg_tex(g, label='ggFig', caption='My ggplot'), dir=getwd())

bdempe18/rchitex documentation built on Nov. 9, 2020, 11:33 p.m.