Questions tagged [officer]

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

413 questions
0
votes
0 answers

How to add content to Power Point slides programmatically using Officer?

I am creating a Power Point presentation using Officer with tables created programmatically. The data varies all the time so my goal is to do it using a for loop or something else. In the example below I have 3 flextable objects stored in a list. In…
elmaroto10
  • 516
  • 4
  • 12
0
votes
1 answer

R mschart turn off line smoothing

I'm using mschart version 0.2.6 to draw line charts in R for powerpoint. I get smoothed lines by default but don't want that. How do I turn it off? I found the following feature request on github but it's closed and I'm not sure how it was…
user2547973
  • 343
  • 2
  • 9
0
votes
1 answer

When using officedown changing from portait to landscape causes problems with page numbering

I have been using officeR and officedown a lot in the past months. These are great packages sparing me a lot of time and effort, since many of my collaborators want *.docx files. However, I have one problem which can be reproduced using the bookdown…
Jorg
  • 21
  • 1
0
votes
1 answer

R officer: Is it possible to print slide as image (jpg, png or other formats)

I have a set of files all with 1 slide created with a custom template created with R officer package Would like to print these individual slides as jpg or png. Current workflow is to print individual pptx files using the inbuilt print function and…
Jai
  • 321
  • 1
  • 8
0
votes
0 answers

`&` in URL becomes `&` when flextable is exported to powerpoint

I'm using flextable and officer to write tables to powerpoints that have hyperlinked cells. When a URL has an & in it, though, the & gets replaced with &. It still works in the flextable in the viewer of my RStudio window, but changes when I…
redarah
  • 152
  • 7
0
votes
0 answers

Remove underline from hyperlinked cells in flextable in R

I'm using flextable and officer to write a table with hyperlinked cells to a powerpoint slide, but I can't figure out how to remove the underline in the URL. Here's my code: library(officer) library(flextable) library(magrittr) # Make the…
redarah
  • 152
  • 7
0
votes
2 answers

Fit Flextable to slide size in PowerPoint with officer

I've made a flextable with various formatting, but when I add to the PowerPoint, the table is outside the slide size. I'm not sure if I have to just go through and set the column & row sizes, or if there is something I should set up in my PowerPoint…
James Holland
  • 1,102
  • 10
  • 17
0
votes
1 answer

R Reporters to Officer and migration

I have a lon script written with the Reporters package and I want to migrate it to officer, will I be able to know if there are sources which indicate the functions of each package? Thank you
0
votes
1 answer

officer generated document use same uploaded image

how does shiny handle temporary files? I have an app where the user uploads images (one by one) and then via officer (and flextable) a document is generated compose(i=1,j=1, value = as_paragraph(as_image(col1,width = 3.46,height = 2.63)),part =…
Mikael
  • 113
  • 1
  • 8
0
votes
1 answer

Why α symbol turns into after flextable and officer update?

As in the title: before the update exported .docx file contained α symbol - after the update exported .docx file displays . Does anyone know what could be the reason?
Tom
  • 339
  • 2
  • 9
0
votes
2 answers

How can I catch errors that occur when ggplot objects are evaluated within a pipe?

I'm producing daily powerpoint slidedecks from raw Covid case data, and today, we have no cases! Excellent, except it broke my reports :-( I generate ggplots, and place them on powerpoint slides using officer. The ggplot errors only arise when it…
Dennis
  • 332
  • 1
  • 4
  • 12
0
votes
1 answer

Logo and text on same line Officer R

I need to place a logo on my document and have a text on the same line. library(officer) library(magrittr) my_doc <- read_docx() my_doc <- my_doc %>% body_add_fpar(fpar(ftext( paste0("Text"), fp_text( font.size = 16)), fp_p =…
Arkadi w
  • 129
  • 22
0
votes
1 answer

Compare Values Across Two Dataframes R

I am building a crime report in R and am comparing two separate dataframes, one from the current year and one from the previous year. The data structure is the same in both. Is there a way to color the values in a flextable based on the crimes that…
0
votes
0 answers

How to center text without using a preexisting Word style using the officer package in R

I am struggling to find a way to center text in a Word document using the officer package in R. I have to use a specific Word template so do not want to rely on the preexisting Word style = "centered". Using fpar(ftext(...)) I am able to adjust many…
Jordan Hackett
  • 689
  • 3
  • 11
0
votes
1 answer

Apply Conditional Text Modifications Through a List of FlexTables

I have a list of 32 flextables with 5 different columns. I want to apply the color and bold function to 2 separate columns, based on a condition. My approach is as follows: ###Create a function that takes an input x (the flextable) and an input y…