officer is an R package for manipulating Word (.docx) and PowerPoint (*.pptx) documents.
Questions tagged [officer]
413 questions
1
vote
1 answer
Table title on a different page when using a flextable object in a officedown document
I'm trying to put together a document where a "Tables" section will be found at the end of it. There, all the tables that I will have cited throughout the document will be shown.
My problem is that whenever I have a long table spanning several…

jordan_oplante
- 75
- 8
1
vote
0 answers
rtudio docker tidyverse not loading
I am running docker rstudio with
docker build -t rstudio .
docker run -dp 8787:8787 rstudio
and encounter this error when attempting to install and load tidyverse and officer:
here is the error from tidyverse:
Error: package or namespace load…

frank
- 3,036
- 7
- 33
- 65
1
vote
1 answer
Is there a function to change the position of column and row in tbl
I have created a table for cars and speed with gtsummary.
The column heading as shown is the cars and the row headings are the summary of the characteristics I was searching for to be in the table. I prefer the N, Median and Range to be the column…

Eugene E
- 13
- 3
1
vote
0 answers
download button in shinyR getting a download.html if I don't wait enough time
I have a download button that creates a word document using images downloaded from AWS. Libraries officer and S3, mainly. this word document loads information when the file is selected.
If my user doesn't waits enough time to load the whole…

Mikael
- 113
- 1
- 8
1
vote
1 answer
How to use `fp_text_default ` function in flextable package
I see there's a function in flextable package, namely fp_text_default. In help files to this function the only example you can find is
fp_text_default(bold = TRUE)
I was wondering if I can use this function to avoid setting font.size=11 everytime I…

Jakub Małecki
- 483
- 4
- 14
1
vote
1 answer
Mschart R to display chart data label fill color
I would like to be able to add the orange color around the text. In PowerPoint, I can achieve this by formatting the data label fill color. Below is the code in R I'm using to set the shading color around the text but I don't know where I can set…

ryut
- 13
- 3
1
vote
1 answer
Text wrapping in .docx output of flextable in r-markdown
I have a r-markdown doc that has a flextable that spreads over multiple pages and on my own computer it knits to docx. perfectly. However, now it is on the server and it automated the knitted document has the table on a new page. This can be…

silas
- 41
- 4
1
vote
1 answer
Using officer to add multiple ggplots and a title to a single PowerPoint slide
I have some code set up that loops through figure creation and adds them to a PowerPoint slide, but it currently can only add one figure to a slide meaning lots of manual work moving images around.
Here are the loops I'm currently working with, I…

ZArmstrong
- 67
- 5
1
vote
0 answers
Printing formatted markdown text with Officedown knit_print_block
I'm using the officedown function knit_print_block to print figure captions in Rmarkdown, with MS Word output. This is needed because I'm looping through lots of figures, and need each to return the captioned figure, as well as a…

MLevine
- 113
- 6
1
vote
1 answer
add gt table image to word doc with shiny and officer package
I am writing a shiny app which:
creates a gt table
saves the gt table as an image (temporary file)
passes that image into a word doc using {officer} package
I am having difficulty with the image creation .... any help appreciated... here is my…

mdb_ftl
- 423
- 2
- 14
1
vote
1 answer
Nested for loop to add slide numbers for ppt reports using officer
With code below, I could dynamically generate multiple ppt reports using officer package:
url_list <- c(
…

ah bon
- 9,293
- 12
- 65
- 148
1
vote
1 answer
R Markdown - knitting to bookdown::word_document2 fails because of officer::ftext used in inline code
Minimum Reproducible example of my R notebook (.Rmd) file which causes the error while knitting to word document:
---
title: "R Notebook"
output: bookdown::word_document2
---
Using inline R code chunks with `officer::ftext` causes an error as…

VBAEnthusiast
- 43
- 7
1
vote
1 answer
Can R Officer Be Used to Output Regression Tables in a Specific Style?
My prior understanding was that the ability to utilize Microsoft Word Table styles is only available in the officedown package, but syntax like
read_docx(path = "reports/template.docx") %>%
body_add_flextable(my_ft) %>%
print(target =…

Michael Lachanski
- 57
- 7
1
vote
1 answer
Add slides based on slide position numbers using officer package
I am creating a Power Point presentation using Officer. Let's say I have created a 10 pages slides (named 10_slides_ppt.pptx) using for loop from a blank.pptx.
My question is, is there a way that I can add one slide before slides with position…

ah bon
- 9,293
- 12
- 65
- 148
1
vote
1 answer
How to extract images from word using media_extract in r?
I am working in rmarkdown to produce a report that extracts and displays images extracted from word.
To do this, I am using the officer package. It has a function called media_extract which can 'extract files from an rdocx or rpptx object'.
In word,…

l.iles
- 31
- 5