0

I can renderchart in R shiny by below code:

 output$example=renderChart2({
    p1 <- nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'multiBarChart')
    p1
    })

Now, I want the same thing in ppt. by using ReporteRs package.I have tried below code but it is not working

library(ReporteRs)
doc =pptx( )
doc <- addSlide(doc, "Two Content")
plotFunc<- function(){ nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'multiBarChart')
} 
doc <- addPlot(doc, fun =print, x = plotFunc)
writeDoc(doc, "r-2.pptx" )

Can someone tell me how do render rCharts in ppt.

Marat Talipov
  • 13,064
  • 5
  • 34
  • 53
Rahul Agarwal
  • 4,034
  • 7
  • 27
  • 51
  • rCharts provide not static image but html , how you wnat to see it into pptx? – Batanichek Apr 11 '16 at 12:11
  • @Batanichek I want a static image in ppt. The one it shows when it renders first on R shiny screen. I was also trying to convert the plot to static image and then apply it in ppt but couldn't find anything. – Rahul Agarwal Apr 11 '16 at 12:14
  • I think that you not find way. why not simply create such chart with ggplot? – Batanichek Apr 11 '16 at 12:20

0 Answers0