topptx {eoffice}R Documentation

export figure to pptx

Description

export figure to pptx

Usage

topptx(
  figure = NULL,
  filename = NULL,
  nr = 1,
  nc = 1,
  irow = 1,
  icol = 1,
  onsame = FALSE,
  title = "",
  left = 0.15,
  top = 0.15,
  width = 6,
  height = 6,
  append = FALSE,
  devsize = FALSE,
  units = "in"
)

Arguments

figure

plot figure function

filename

output filename

nr, nc

two numbers to indicate the figures will be drawn in an nr-by-nc array on the device by columns or rows, respectively.

irow, icol

the number to indicate which row or column for the figure to be drawn

onsame

Boolean value show to draw on same slide or not

title

title for the figure

left, top

two numbers which gives the number of lines of margin to be specified on the left and right sides of the plot

width

width of the output figure

height

height of the output figure

append

append or not

devsize

Boolean value show use device size or not (default = FALSE)

units

the units in which to return the value – inches, cm, or pixels (device units)

Author(s)

Kai Guo

Examples

if(interactive()){
plot(mtcars$mpg, mtcars$disp)
topptx(filename = file.path(tempdir(), "mtcars.pptx"))
## use ggplot2
ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()
topptx(filename = file.path(tempdir(), "mtcars.pptx"))
}

[Package eoffice version 0.2.2 Index]