Question

Any suggestions on how to use R to present .ppt slides. I am giving a presentation and instead of switching back and forth between PowerPoint and R I'd like to be able to present some .ppt slides within R itself. I've seen lots of talk about going from R to PowerPoint but not much for going the other way.

Thoughts?

Était-ce utile?

La solution 4

Exporting the ppt as images would make handling them in R

Autres conseils

You can use the package ReporteRs:

library( ReporteRs )

pptx.file = "presentation.pptx"
# Creation of doc, a pptx object (default template)
doc = pptx( )

doc = addSlide( doc, "Two Content" )
# add into doc first 10 lines of iris
doc = addTitle( doc, "First 10 lines of iris" )
doc = addTable( doc, iris[1:10,] )

# add text with stylename "Normal" into doc (and an empty line just before)
doc = addParagraph( doc, value = c("", "Hello World!"), stylename = "Normal" )

doc = addSlide( doc, "Title and Content" )
# add a plot into doc 
doc = addPlot( doc
            , function() plot( rnorm(10), rnorm(10) )
)

# write the doc 
writeDoc( doc, pptx.file )

Do you have to work with .ppt? Otherwise you could look into packages such as knitr which are meant to facilitate dynamic reports with R.

Maybe the question "How to embed a shell and browser into a presentation?" is a good start.

I think once you got a browser in powerpoint you are pretty free to work with R.

If you use Mac OS X, perhaps you can use AppleScript to control both R and PowerPoint. (If you use Windows, there might be a similar scripting option that you could research.)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top