toxlsx: export figure to pptx

View source: R/toffice.R

toxlsxR Documentation

export figure to pptx

Description

export figure to pptx

Usage

toxlsx(
  figure = NULL,
  filename = NULL,
  width = 6,
  height = 6,
  devsize = FALSE,
  units = "in"
)

Arguments

figure

plot figure function

filename

output filename

width

width of the output figure

height

height of the output figure

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)
toxlsx(filename = file.path(tempdir(), "mtcars.xlsx"))
## use ggplot2
ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()
toxlsx(filename = file.path(tempdir(), "mtcars.xlsx"))
}

eoffice documentation built on Oct. 5, 2022, 9:05 a.m.