#install.packages("eoffice")
library(eoffice)
## Warning: package 'eoffice' was built under R version 4.0.5
## Bioconductor version '3.11' is out-of-date; the current release version '3.12'
## is available with R version '4.0'; see https://bioconductor.org/install
library(ggplot2)
plot(mtcars$mpg, mtcars$disp, col = factor(mtcars$cyl), pch = 20)

topptx(filename ="mtcars_1.pptx")
ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()

topptx(filename = "mtcars_2.pptx")## or
todocx(filename = "mtcars.docx")
p <- ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point()
p

topptx(p,filename = "mtcars_3.pptx", width = 6, height = 4)
totable(head(mtcars), filename = "mtcars_4.pptx")
tofigure(p, filename = "mtcars.pdf")
## [1] "mtcars.pdf"
?topptx
## starting httpd help server ...
## done