Learn R Programming

eoffice (version 0.1.6)

toffice: export graph to MS office

Description

export graph to MS office

Usage

toffice(figure = NULL, format = "pptx", filename = "temp.pptx",
  append = FALSE, width = 4, height = 4)

Arguments

figure

plot figure function

format

file format

filename

output filename

append

append or not

width

width of the output figure

height

height of the output figure

Examples

Run this code
# NOT RUN {
if(interactive()){
plot(mtcars$mpg, mtcars$disp)
toffice(filename = file.path(tempdir(), "mtcars.pptx"), format = "pptx")
## use ggplot2
ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()
toffice(filename = file.path(tempdir(), "mtcars.pptx"),format = "pptx")
}
# }

Run the code above in your browser using DataLab