All Questions
155
questions
13
votes
4answers
646 views
flextable in Rmarkdown docx not printing within if statement if other text
I'm trying to use the package flextable to get some nicely formatted tables in my Rmarkdown (going to word file). The tables work just fine in general but if I put it within an if statement, if there ...
10
votes
3answers
2k views
flextable autofit in a Rmarkdown to word doc causes table to go outside page margins
Hi I am trying to use flextable in an Rmarkdown .doc document to format my tables. I like the simple formatting options that flextable gives (but open to other similar packages) but have found ...
8
votes
0answers
2k views
add caption to flextable in docx
How could one add a caption to a flextable rendered to docx?
EDIT: The aim is to produce a proper caption which can be referenced within the document to produce a list of tables and inline references....
7
votes
2answers
1k views
Using flextable in r markdown loop not producing tables
I have many tables to create and am trying to create them in a loop. I'm using flextable with rmarkdown inside rstudio. Using print(theFlextable) command in a loop produces a list of text rather than ...
7
votes
1answer
674 views
Applying a Word style (table or paragraph) to flextable object
I'm trying to apply a Word style (table or paragraph) to a flextable object. My motivation is to find a way to stop a flextable from splitting across rows at a page break when outputted to a Word ....
6
votes
1answer
883 views
Table and Figure cross-reference officer R
I would like to be able to cross-reference a table or figure in a word document using the officer R package.
I have come across these materials so far but they do not seem to have a solution:
https://...
6
votes
1answer
439 views
Table Cross-References in Bookdown with MS-Word Output?
How can I make table cross-references work in a bookdown document with all of the output formats pdf, docx, and html? Or maybe more specifically, how can I get table cross-references working for ...
5
votes
1answer
317 views
Looping Flextables in R Markdown documents with Word output
I am looking to print multiple flextables in a single R Markdown document. This is not challenging when using html output, but I need Word output.
With html output, the following R Markdown code (...
5
votes
2answers
294 views
Dynamically set colnames from character string in flextable
The flextable help details describes adding new headers as manually typing each existing header name against each new header name, like this:
library(flextable)
ft_1 <- regulartable(head(iris))
...
5
votes
1answer
240 views
Way to merge flextables and retain formatting
Say I have 2 flextables:
ft1 <- regulartable(head(iris))
ft2 <- regulartable(tail(iris))
And they have distinct formatting:
ft1 <- bg(ft1, bg="green")
ft2 <- color(ft2, color = "blue")
...
4
votes
2answers
3k views
Can't install flextable
I'm having an issue installing Flextable, and it seems to be because of the gdtools package. It looks like gdtools relies on a .dylib file? Any ideas?
> install.packages("flextable")
There is a ...
4
votes
1answer
797 views
Is it possible to change flextable default font from arial
I love David Gohel's Officer and Flextable packages and they are really a flexible alternative to write word document reports with complex layouts which are not achievable in R markdown.
I have ...
4
votes
2answers
119 views
RMarkdown package flextable fails immediately with “read_docx only support docx”
I'm sorry for a minimally produced question...... not lots of information because it just fails the first time I'm ever trying with this and I am not very skilled in RMarkdown debugging yet.
I'm ...
4
votes
1answer
2k views
Formatting multiple columns with flextable r package
Is it possible to format multiple columns with one line of script using flexitable?
The example includes variables of two different types of double. I'd like to:
round variables greater than 1000 to ...
4
votes
1answer
528 views
Indent a Flextable made with R-ReporteRs
I want to indent a (flex)table created with the ReporterRs package. Here's an example:
library(ReporteRs)
df <- data.frame(Column1 = 1:5, Column2 = c("a","b","c","d","e"))
Mydoc = docx(title="A ...