reporters

Powerpoint manipulation - Add a slide at an index OR delete a slide

走远了吗. 提交于 2019-12-11 15:56:09
问题 I've been bouncing between two packages for my needs. We make quite a few powerpoints at work, and I've been trying to automate the template, so all that's left to do is populate the template with data. We are pretty data heavy, and the actual content changes pretty drastically, so I'm just trying to create the template to start. I've created a master template already, which has every possible slide that I would use. Then using either officer or reporteRs, I'm deleting/editing/creating slides

Reporters package to download docx report from shiny

為{幸葍}努か 提交于 2019-12-11 08:08:24
问题 I tried to reproduce This example in Rstudio, It is working very well. Then I just put everything together to download the template in shiny ! but it does not work : library(shiny) library(ReporteRs) library(ReporteRsjars) library( ggplot2 ) library( magrittr ) library( ggplot2 ) library( magrittr ) ui<- fluidPage( downloadButton('downloadData', 'Download') ) server<- function(input, output,session) { output$downloadData <- downloadHandler( filename = "file.docx", content = function(file) {

Side-by-side plotting in ReporteRs using addImage

血红的双手。 提交于 2019-12-11 06:23:58
问题 I am using the ReporteRs package to automatically create a docx document. To this end, I need to put two external images side by side. Is it not an option manually combining them before using them in R , since that would be a large number of combinations. library("ReporteRs") doc <- docx() doc <- addImage(doc,"image1.png",par.properties = parLeft(), height=1, width=1) doc <- addImage(doc,"image2.png",par.properties = parLeft(), height=1, width=1) writeDoc(doc, file = "example.docx") How can I

Fill an Entire PowerPoint Slide with an R Plot?

北慕城南 提交于 2019-12-11 06:09:29
问题 How can I fill an entire PowerPoint slide with an R plot? I'd like to use vector graphics (otherwise screenshot and crop would be a solution). I'd also like to avoid manual touches. The following code (grabbed from this post) does a perfectly fine job of filling the "Content" of a "Title and Content" slide. library( ReporteRs ) require( ggplot2 ) mydoc = pptx( ) mydoc = addSlide( mydoc, slide.layout = "Title and Content" ) mydoc = addTitle( mydoc, "Plot examples" ) myplot = qplot(Sepal.Length

create pdf in addition to word docx using officer

我的梦境 提交于 2019-12-11 05:20:03
问题 I am using officer (used to use reporters) within a loop to create 150 unique documents. I need these documents however to be exported from R as word docx AND pdfs. Is there a way to export the document created with officer to a pdf? 回答1: That's possible but the solution I have depends on libreoffice. Here is the code I am using. Hope it will help. I've hard-coded libreoffice path then you probably will have to adapt or improve the code for variable cmd_ . The code is transforming a PPTX or

Read PowerPoint into R

倾然丶 夕夏残阳落幕 提交于 2019-12-11 01:11:12
问题 Is it possible to import PowerPoint files into R? I saw that you can use the ReporteRs package to create and manipulate powerpoint files, but I couldnt find anything on importing them. I was hoping that I could load a pptx into an object like. pptx1<-read.ppt(file1) pptx2<-read.ppt(file2) and then merge them into one file pptx1<-addslide(pptx2,..) Background: I would like to create a reporting tool based on slides from many different powerpoint files and since I am very bad at VBA, I was

Format Numbers in FlexTable

偶尔善良 提交于 2019-12-11 00:01:37
问题 I am using ReporteRs to generate a flexTable using the following piece of code: library( ReporteRs ) baseCellProp <- cellProperties( padding = 2 ) baseParProp <- parProperties(text.align = "center") ft.list <- list(mua= 1, mub = 2, mug = 1e-7) ft.data <- t(data.frame(ft.list)) ft.FlexTable <- FlexTable( data = ft.data, add.rownames = TRUE, header.columns = FALSE, body.cell.props = baseCellProp, body.par.props = baseParProp) ft.FlexTable <- setFlexTableWidths(ft.FlexTable, widths =c(1,2)) ft

R ReporteRs: Editing Existing Slides

时光毁灭记忆、已成空白 提交于 2019-12-08 21:45:39
问题 I have a presentation in pptx format that I need to update frequently with graphs that I generate with an R script. I would like to automate the replacement of the graphs without having to copy and paste between screens a whole bunch of times. I have been playing with the ReporteRs package and it seems promising but I cannot figure out how to simply replace the graphs that are already in the presentation. All of the documentation on ReporteRs indicates that you have to add a new slide and

R: Function to export currently active R plot to Powerpoint/Word/LibreOffice

浪子不回头ぞ 提交于 2019-11-30 10:14:02
问题 Currently I always export my R graphs to Powerpoint in vector format using the excellent ReporteRs package, as in library(ReporteRs) myplot = function() print(qplot(Sepal.Length, Petal.Length, data = iris, color = Species, size = Petal.Width, alpha = I(0.7))) doc = pptx() doc = addSlide(doc, slide.layout = "Blank") doc = addPlot( doc, myplot, vector.graphic = TRUE, fontname="Arial", offx = 0.1*dim(doc)$slide.dim["width"], offy = 0.05*dim(doc)$slide.dim["height"], width = 0.8*dim(doc)$slide

Creating Professional Looking Powerpoints in R

a 夏天 提交于 2019-11-28 04:46:11
Is there a good way to use data from R and a package like ReporteRs to generate complete Powerpoints? I have about 900 slides to create. Our analysts currently follow this path: DB --> SAS --> CSV --> PPTX (embedded graphics) (x900 times) This is manual, open to lots of errors and slow. Ideally, I would prefer: DB --> R + ReporteRs --> PPTX (x1 time) The issue is 2-fold. First, our clients (unreasonably) prefer PPTX over a web or even PDF format. Second, R graphics cannot be edited in PPTX, and are sometimes not ideally sized/formatted, especially in terms of axis text sizes. So is there a way