Questions tagged [officer]

officer is an R package for manipulating Word (.docx) and PowerPoint (*.pptx) documents.

413 questions
0
votes
0 answers

How to crop plots with R officer package?

When exporting plots to a .docx with the officer package, a lot of white space is created around the plots. That way it is using up way to much space in the word document. It would be nice to crop the picture to get rid of the white space around…
BanffBoss122
  • 149
  • 9
0
votes
1 answer

Umlauts are not printed correctly when printed into document

When printing a word file with the print() command, umlauts (ä,ö,ü) are not being printed correctly into the word file. My R Studio is setup to save scripts as UTF-8. I manually saved all files "encoded as UTF-8", after I find/replaced all umlauts…
BanffBoss122
  • 149
  • 9
0
votes
1 answer

Creating multiple Word file reports in a for loop in R Markdown

I'm trying to generate multiple reports automatically with R markdown. I have a MS Word file that I import to R with officer library. In this MS Word file I want to substitute the word alpha with A, B, and C names that I defined in a VarNames…
Sara
  • 1
  • 1
0
votes
1 answer

Print a Shiny reactive value on WordR

I am looking for some help please to print a reactive value in a Shiny session into a docx with WordR. A very stripped down version of my app is presented below. The code for the docx template is `r reactive({declared_user()})` (which is bookended…
CallumH
  • 751
  • 1
  • 7
  • 22
0
votes
1 answer

How to add a border to fpar in Officer R

I am trying to use the Officer package to create a docx. I want to create paragraphs with different levels and text styles while also having each paragraph have its own border. I have tried using fp_par with both a block_list command and a fpar…
0
votes
1 answer

Include a hyperlink as part of a sentence in a powepoint slide with Officer?

I am trying to use the excellent Officer package to produce a set of slides with some automated analyses. In the last slide I would like to include a list of sites and links. For example "RStudio: https://rstudio.com/" Is there a way of doing this…
Gakku
  • 337
  • 2
  • 8
0
votes
0 answers

How to downgrade an installed package version?

I'm trying to downgrade the package version of officer that I have from the most recent (v 0.3.12) to v 0.3.8. I tried running the below lines, all of which failed: What am I doing wrong? require(devtools) install_version("officer", version…
gabby
  • 11
  • 3
0
votes
1 answer

R flextable vertical merge conditional on another column

In the example below I would like to vertically merge like values in column 1 and then vertically merge like values in column 2 conditional on them being in the same group in column 1. Right now it currently merges "G2" across groups "a" and "b"…
Jordan Hackett
  • 689
  • 3
  • 11
0
votes
1 answer

R officer powerpoint complains with external image that is a pdf

I want to add a graphic in the form of a pdf to a power point file created by officer. The following code works, in the sense that the powerpoint is created and the pdf is included. But to get to the powerpoint you have to let it repair itself.…
JerryN
  • 2,356
  • 1
  • 15
  • 49
0
votes
2 answers

Update existing table of contents and table of tables officer r

Is there a way using officer to update an existing table of contents and table of tables with in my document? I know about the function body_add_toc() but is there a way to update these elements without having to recreate them?
Jordan Hackett
  • 689
  • 3
  • 11
0
votes
0 answers

Add flextable into a given position at word document

I am trying to add a flextable to a word document at a given bookmark. I have created a flextable which I can display correctly and also insert it at the word document, though I want it to be included at the bookmark "Tabla33" position Though I got…
jdl
  • 1
0
votes
1 answer

Removing graphs, images, and data frames from a powerpoint using R

My intention is to be able to update a powerpoint I have generated in R without having to generate a new deck. For this to work, I need to be able to delete or over-ride in some manner the content that is present in the power point deck I have…
0
votes
1 answer

Adding title to the table with flextable and officer library

I am preparing a function to create table output from a categorical variable that can be exported to word using flextable and officer library. libraries needed: library(dplyr) library(officer) library(flextable) Function is: tab_std<-function(data,…
0
votes
0 answers

How to do "keep with next" paragraph?

I use the "officer" package in R to create a Word document. In this document, I have several pictures with picture titles. But sometimes, the picture title is in a page, and the picture is in the next page. In Word, the function "keep with next"…
0
votes
2 answers

R Officer Update the text of a shape

I am using officer to generate a weekly PowerPoint deck for my management. They have provided me with a template they wish to use. I have automated the whole process apart from one part which is causing me some difficulty i was hoping someone could…
John Smith
  • 2,448
  • 7
  • 54
  • 78