问题
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.
来源:https://stackoverflow.com/questions/36548167/render-rcharts-using-reporters-package-in-powerpoint