officer is an R package for manipulating Word (.docx) and PowerPoint (*.pptx) documents.
Questions tagged [officer]
413 questions
2
votes
1 answer
Rmd report does not import margins, header o footer from template when using officedown::rdocx_document:
Edit:
I installed again the previous version of the package (ver. 0.2.1) and the problem is solved.
__
I am making a Rmarkdown report with the officedown package.
My Word output imports well the Word Styles of the template document, but does not…

AlvaroFernandez56
- 65
- 4
2
votes
0 answers
Changing the font size of figure captions in RMarkdown PowerPoint output
I'm attempting to adjust the font size of figure captions rendered below a map/chart in PowerPoint (PPT).
The examples below have been produced using chunk options such as r world_map, fig.cap="[A LINK](./PATH/TO/*.html)" and r car_chart,…

IvanP
- 129
- 8
2
votes
0 answers
RShiny - export diagrammeR plot to powerpoint
I have an RShiny application that generates a network plot using the diagrammeR package:
blc3001 <- eventReactive(input$datapath,{
data_blc <- readxl::read_xlsx(input$datapath$datapath)
blc3001 <- "digraph test{"
}) …

mbriganti
- 21
- 1
2
votes
1 answer
Plots are squished when exporting to .pptx using officer
I'm using the officer package to write ggplots to Powerpoint, and even though my plots look good in my Rstudio viewer, my plots are getting "squished" when I add them to any custom slide with smaller content boxes.
I did my best to reproduce my…

redarah
- 152
- 7
2
votes
1 answer
Alignment/fitting of a flextable to page width in R
I'm creating a pretty basic report adding small tables to a docx in a loop.
I'd like to fit them to the width of the page or at least align the table (not cells' content) to the left.
It should be quite an easy task but I found only references…

Nico
- 191
- 1
- 6
2
votes
2 answers
How can I add a baseplot with no fixed values to a document
I want to add a baseplot to a word document.
In the documentation for the officer package there's an example that uses the plot_instr function:
anyplot <- plot_instr(code = {
barplot(1:5, col = 2:6)
})
doc <- read_docx()
doc <- body_add(doc,…

Robert
- 924
- 1
- 9
- 20
2
votes
0 answers
How to add alt-text with the R officer package?
I create powerpoint files using the R package Officer. I would like to make the files accessible by adding alt-text to each slide, and ideally to different parts of each slide. I know how to add alt-text using Rmarkdown when creating word documents,…

Daudi
- 119
- 1
- 5
2
votes
0 answers
How to create a footer on powerpoint slide using R packages officedown and officer
Revised a second time!!
There is an example .rmd that comes with the officedown package and in that are chunks that show how you can use the officer package placeholder ("ph") tags within the chunk options, which is great. Here is a minimum…

user3693572
- 33
- 4
2
votes
1 answer
add icons to powerpoint bullets that are dependent upon a column's value using R's officer package
I'm trying to automate a PowerPoint report. In this report, I'll have a list of values and then a dichotomous indicator (good vs bad). When the report is generated, I want each value to have a happy face when the status is "good" and a frowning face…

J.Sabree
- 2,280
- 19
- 48
2
votes
0 answers
Duplicate powerpoint slides (text and formatting) with officeR
I would like to create additional slides in my R generate powerpoint presentation that are exact duplicates of some other slide of the same powerpoint presentation.
Is there any function of officeR that does so?
Reading the officeR package…

Mario
- 137
- 1
- 10
2
votes
3 answers
Maximize imported image on page in officer / officedown to Word (docx)
I recently tried using officedown to create a .docx report of my document. In my documents I import images from an \images folder in my project directory.
Normally when I knit a document I am able to maximize its position on the page.
Does anyone…

Patrick
- 915
- 2
- 9
- 26
2
votes
1 answer
Officer package in R
All the ph_with_* functions have been deprecated. Is there a way if I can still use the old version of officer and flextable which will allow me to use ph_with_* functions. I have an automated process and due to the new version, I am having a hard…

Anshul Jain
- 23
- 3
2
votes
0 answers
Restart autonumbering in R officer package
I am numbering tables and figures sequentially using
run_autonum(seq_id = "fig", ...)
I would like to restart numbering within each section of the document. I can't find anything in the User's Manual or Stack Overflow but a Microsoft website…

Dennis Fisher
- 31
- 2
2
votes
0 answers
Adding ordered list instead of unorder list in powerpoint by officer
This is a followup question on top of Adding bullet before statement in powerpoint via officer in R
The script below is able to create a powerpoint slide with bullets, what if I want to insert a numbered list instead of bullet? I am aware of the…

lokheart
- 23,743
- 39
- 98
- 169
2
votes
1 answer
Setting line height in table created using flextable inserted into powerpoint using officer
I have drafted some dataframes with text inside that linebreaks are present in each cell, the dataframe is converted to flextable and then inserted into a powerpoint slide using officer. I found the line height a bit too much, I tried using the…

lokheart
- 23,743
- 39
- 98
- 169