# NOT RUN {
# Create a new document
doc = pptx( title = "title" )
# add a slide with layout "Title and Content" then add an image
doc = addSlide( doc, slide.layout = "Title and Content" )
img.file = file.path( Sys.getenv("R_HOME"), "doc", "html", "logo.jpg" )
doc <- addImage(doc, img.file )#work with only windows
# Write the object in file "~/presentation.pptx"
writeDoc( doc, "~/presentation.pptx" )
# }
Run the code above in your browser using DataLab