# NOT RUN {
# }
# NOT RUN {
myPres<-PPT.Init(visible=TRUE)
myPres<-PPT.AddTitleSlide(myPres,title="How to add R graphics to PowerPoint!")
## Example adding graphic from file
myPres<-PPT.AddBlankSlide(myPres)
jpeg(file="testRplot1.jpeg",quality=100,height=960,width=960)
plot(rnorm(100))
dev.off()
# You must give full file path
myPres<-PPT.AddGraphicstoSlide(myPres,file=paste(getwd(),"testRplot1.jpeg",sep="/"))
unlink(paste(getwd(),"testRplot1.jpeg",sep="/"))
## Example adding graphic from current graphics device
myPres<-PPT.AddBlankSlide(myPres)
windows()
hist(rnorm(100))
myPres<-PPT.AddGraphicstoSlide(myPres,size= c(10, 10, 300, 500))
hist(runif(100))
myPres<-PPT.AddGraphicstoSlide(myPres,size= c(350, 10, 300, 500))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab