270 questions
2 votes
1 answer
544 views
Farsi/persian/arabic text not showing in Rmarkdown officedown/flextable when knitting to MS word
I'm using rmarkdown and also two useful packages (officedown and flextable) to produce an MS word document. However, when I write in other languages or change the header label of tables (using ...
1 vote
1 answer
1k views
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 ...
1 vote
1 answer
428 views
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 ...
0 votes
1 answer
1k views
Rmarkdown PDF tables, merge cells and return to line
I am trying to integrate a survey in my pdf report, the survey is composed of three columns; one with the code, the second with the question and the third with the possible answers. I would like to ...
2 votes
1 answer
1k views
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 ...
2 votes
1 answer
650 views
Flextable label not created in rmarkdown
I am using flextable to produce tables for a pdf document rendered with rmarkdwown. I want to cross-reference the tables, but they do not produce the label needed for the cross reference to work. My ...
0 votes
2 answers
457 views
Flextable table links not linking to my tables
I have generated tables in docx using Rmarkdown (Output: word_document), with captions and links to the tables. For some reason clicking on the links takes me to the top of my word file and not to the ...
3 votes
0 answers
3k views
Flextable R: How to keep columns width after adding a header
I have a tibble with two columns: library('flextable') library("tidyverse") df <- tibble('Long' = "Long Long Long Long Long Text", 'Short' = 'Short Text') ...
1 vote
0 answers
334 views
Changing Background color of header and put stripped gray scale to rows kable
is there any way to change the header column and put the rows in grays (stripped style) by exteding the following code? library(ReporteRs) x = structure(c(34L, 6L, 9L, 35L), .Dim = c(2L, 2L), ....
0 votes
1 answer
597 views
Can I filter out rows in a flextable after creating the flextable in rmarkdown?
I have a table output to a word doc in rmarkdown using FlexTable. I import the data for the table (which is a bunch of character strings) from a seperate excel file that I use for keeping a record. I ...
5 votes
0 answers
2k views
How can I tell R's flextable to add linebreaks within words if necessary to fit my table in the available width?
I like the flextable package for R. I am using it to create tables for a Shiny app. Sometimes the tables occupy half the browser width, which might be quite a narrow space on some browsers. I would ...
6 votes
0 answers
333 views
Is there a way to save a flextable in R to a LaTex file?
I would like to save a flextable to a LaTeX (.tex) file in R. Is there a way to do that? For example, how could I save this table? library(flextable) ft <- flextable(head(mtcars)) ft
4 votes
1 answer
1k views
flextable: embed ggpplots using data from 2 columns with lists (for comparing) as a single plot per row
Following https://ardata-fr.github.io/flextable-book/cell-content-1.html#base-plots-and-ggplot-objects I would like to have small plots. gg_line <- function(z) { z <- scale(z) z <- na....
2 votes
1 answer
985 views
How to print sign of numbers in flextable output along with other requirements?
Context: Flextable packages (version 0.6.6) uses two types of functions to format columns with numbers (double): colformat_double() and set_formatter_type(). The first has arguments to control decimal ...
1 vote
0 answers
293 views
Creating word table with merged cells in R flextable
I have to create a table in R that exports to word and should look something like this: . As you can see there are several merged and non-merged cells in this table. Side note I will have to do this ...