Questions tagged [officedown]

64 questions
0
votes
0 answers

I am getting an error while Knitting officedown for the first time

Below is what I am trying to knit --- date: "`r Sys.Date()`" author: "Your Name" title: "officedown template" output: officedown::rdocx_document --- ```r library(officedown) #> Warning: S3 method 'print.dml' was declared in NAMESPACE but not…
0
votes
0 answers

Simplest way to get overlapping text in an Rmd presentation slide to automatically go onto a new slide?

This seems like a straightforward thing to do but I can't find any related questions in my search queries. Dummy .Rmd script: --- title: "Untitled" author: "Me" date: "22/11/2022" output: powerpoint_presentation --- ```{r setup,…
Nautica
  • 2,004
  • 1
  • 12
  • 35
0
votes
1 answer

Knitting parameterized reports as chapters in RMarkdown while preserving in-text cross-referencing

I am creating a report that contains several chapters (one chapter per species, following the same template). I think this is the best approach to creating it: make the intro materials as one Rmd file, knitted to Word loop through the list of…
MargaretS
  • 21
  • 4
0
votes
0 answers

flextable hyperlink_text not working with officdown::rdocx_output

I am trying to print a table that includes a hyperlink, but when the document renders the hyperlink URL has the prefix "file///" and does not link to the webpage. Reproducible Example: --- title: "Untitled" date: "`r Sys.Date()`" output:…
Jessica
  • 75
  • 5
0
votes
1 answer

Dynamically generating figures with captions in Word output from Rmarkdown document

I'm trying to generate a Word document with figures. I use {officedown} and {officer} packages. I need to do it dynamically, in a loop since I don't know how many figures there will be. This is my Rmarkdown code: --- output: …
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
1 answer

Flextables adhere when rendering in a for loop

I'm struggling with flextables adhering to each other when I render them in a for loop in my rmarkdown notebook. The output is docx (officedown::rdocx_document to be precise). This is my code: dt <- head(iris) for (i in 1:10) { …
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
1 answer

RMarkdown flextable: Does as_image() work with rmarkdown::render()?

I want to insert an image into a flextable which works perfectly when using the knit button. However, I need to execute the code by calling rmarkdown::render(input = "path_to_file/file.Rmd"). This generates the following error message: Error in…
0
votes
2 answers

RMarkdown Officedown: Loop over child document containing flextable with UTF-8 encoding

Is it possible to include a child document in a loop that contains a flextable with UTF-8 encoding? This is my YAML: --- output: officedown::rdocx_document --- Without using a loop, it works perfectly and the Delta ("\U0394") is displayed correctly…
0
votes
1 answer

MS Word number of pages in a flextable table using Rmarkdown

Is there a way to insert MS Word computed field - total number of pages in the document - into a flextable table? In the officer package there's a function run_word_field. I tried to use it the following way: flextable(df) %>% compose(value =…
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
1 answer

Generate tables in a loop with tab.id with officedown R package

Is there a way to generate tables in a loop and set tab.id that can be later cross-referenced? Generating tables in a loop is trivial, but I don't know how to set ids and captions afterwards. Please, see the code below. Here I'm iterating over a…
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
1 answer

Unequal indentation in officedown R package

I'm using officedown package to generate MS Word documents. I noticed a strange and annoying issue. There are unequal indentation on left and right in the generated output (see the attached picture) The Rmarkdown code I use: --- output:…
Jakub Małecki
  • 483
  • 4
  • 14
0
votes
0 answers

Document title, author and date lost when using officedown::rdocx and reference_docx

If I do not use a word reference file and define tittle , author and date I get the standard title page. --- title: Report Title author: Ross date: 3/3/2022 output: officedown:: rdocx_document --- however if I nominate a company template…
0
votes
1 answer

Is there a way to change the device output of officedown::rdocx_document() from .jpg to .emf?

When using officedown::rdocx_document in R Mardown, the Office Word output will include the plots as a .jpg image although my desire is to automatically include the plots of my R markdown in format .emf (Enhanched Metafile). I know that with the…
0
votes
1 answer

How to combine flextable and officedown to output flextable objects with a particular Word Table style?

I am interested in outputting flextable objects (mainly summary statistics and regression tables) according to a particular Word Table-style. Based on prior Stack Overflow questions and documentation, e.g. Applying a Word style (table or paragraph)…
0
votes
0 answers

Template files used in the manual book Officeverse

I'm learning officer and officedown packages by reading the manual book Officeverse. However, I couldn't find the template files such as templates/templates_demo.docx to reproduce the examples. I was wondering, are these templates available? Your…
Xiaochi
  • 65
  • 5