code2office: Save plot/ggplot code to Microsoft Powerpoint format

View source: R/code2pptx.R

code2officeR Documentation

Save plot/ggplot code to Microsoft Powerpoint format

Description

Save plot/ggplot code to Microsoft Powerpoint format

Usage

code2office(
  ...,
  ggobj = 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

...

Further argument to be passed to function dml()

ggobj

a ggplot object

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

## Not run: 
code2office(plot(iris))
require(ggplot2)
gg=ggplot(data=mtcars,aes(x=wt,y=mpg))+geom_point()
code2office(ggobj=gg)

## End(Not run)

rrtable documentation built on April 5, 2022, 9:08 a.m.