plot2office: Save plot/ggplot to Microsoft Powerpoint format

Description Usage Arguments Examples

View source: R/plot2pptx.R

Description

Save plot/ggplot to Microsoft Powerpoint format

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plot2office(
  x = NULL,
  target = "Report",
  append = FALSE,
  title = "",
  type = "pptx",
  preprocessing = "",
  plottype = "auto",
  echo = FALSE,
  parallel = FALSE,
  left = 1,
  top = 1,
  width = NULL,
  height = NULL,
  aspectr = NULL
)

Arguments

x

An object of class ggplot2 or a string vector encoding plot or ggplot

target

name of output file

append

logical value

title

Optional character vector of plot title

type

"pptx" or "docx"

preprocessing

A string of R code or ""

plottype

character One of c("auto","plot","ggplot","emf")

echo

logical. If true, show code.

parallel

logical. If true, add two plots side by side

left

left margin

top

top margin

width

desired width of the plot

height

desired height of the plot

aspectr

desired aspect ratio of the plot

Examples

1
2
3
4
5
require(ggplot2)
x=c("plot(iris)","ggplot(mtcars,aes(x=hp,y=mpg))+geom_point()")
plot2office(x,title="2 plots",parallel=TRUE)
plot2office(x,title="2 plots",parallel=TRUE,echo=TRUE,append=TRUE)
plot2office(x,parallel=TRUE,echo=TRUE,append=TRUE)

rrtable documentation built on April 2, 2020, 5:09 p.m.