flextable

How to knit_print flextable with loop in a rmd file

旧时模样 提交于 2019-12-07 15:56:31
I am trying to produce mutltiple tables using the flextable and kable packages. When I want to output some table iteratively, I found knit_print of flextable is not working in loop. Below is a minimal example: --- output: word_document --- ```{r} library(flextable) library(knitr) ``` ```{r} data(cars) speed<-unique(cars$speed) for (v in 1:length(speed)) { carspd<-cars[which(cars$speed==speed[v]),] tb<-regulartable(carspd) knit_print(tb) } knit_print(tb) ``` Just the last knit_print can print the result to the word_document with the .Rmd file. Now I find the difference of them in .md which is

Table and Figure cross-reference officer R

て烟熏妆下的殇ゞ 提交于 2019-12-07 06:07:24
问题 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://davidgohel.github.io/officer/articles/word.html#table-and-image-captions and a similar question add caption to flextable in docx In both of these I can only insert a caption as a level 2 header and not a true table caption. What I want to be able to do in Word is Insert -> Cross-reference and go

How can I add rows to a Google Web Toolkit flextable in the UiBinder?

牧云@^-^@ 提交于 2019-12-07 00:10:43
问题 Where can I find a UiBinder template for the FlexTable? I am using Google Web Toolkit (GWT). 回答1: I found a link text that said if you do not need to handle events, you can just use straight HTML instead of FlexTable for layout: <g:HTMLPanel> <table> <tr><td>Info:</td><td><g:TextBox ui:field="infoTextBox"/></td></tr> </table> </g:HTMLPanel> 回答2: AFAIK, there's no custom "template" for FlexTable (as there is for, for example, DockLayoutPanel). Besides, FlexTable is used when you have content

Is it possible to generate the RTable (FlexTable) in pdf with RMarkdown?

三世轮回 提交于 2019-12-06 09:51:08
I am just curious that is it possible to generate the RTable (FlexTable) in pdf with RMarkdown? I can generate it in html output but it is not working for pdf output. I google this question but there is no exact answer for it. My code: ```{r, echo=FALSE, results='asis'} library(ReporteRsjars) library(ReporteRs) library(rtable) library(dplyr) vanilla.table(iris) ``` Since it can generate in word, I assume it is possible for the pdf one. I have tried cat(as.html(vanilla.table(iris))) but it is not working. Can I friendly ask if you have any idea of it? This is not meant to be an answer, but only

Send an email with dataframe as a flextable

孤街浪徒 提交于 2019-12-04 06:44:29
问题 I have a code which I use to send mails everyday and I use the xtable package to get it done. But lately, I've got accustomed to using the flex table as it is more feasible to my requirements. But when I change the code to use the flextable function, all I am sending is a blank mail with no body at all. This is the sample data set samplemondata<-structure(list(Root.Cause = c("Blocking", "Created in Error", "Duplicate", "Horizontal liquid bottle", "Overhanging", "Title Not Facing Out", "Trash

Send an email with dataframe as a flextable

允我心安 提交于 2019-12-02 12:50:39
I have a code which I use to send mails everyday and I use the xtable package to get it done. But lately, I've got accustomed to using the flex table as it is more feasible to my requirements. But when I change the code to use the flextable function, all I am sending is a blank mail with no body at all. This is the sample data set samplemondata<-structure(list(Root.Cause = c("Blocking", "Created in Error", "Duplicate", "Horizontal liquid bottle", "Overhanging", "Title Not Facing Out", "Trash in the Bin", "Units Not Stowed Securely", "Unorganized", "Wrong Bin Type"), BCN1 = c("109", "", "", "",

Can't install flextable

拈花ヽ惹草 提交于 2019-12-02 06:25:51
问题 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 binary version available but the source version is later: binary source needs_compilation flextable 0.4.0 0.4.2 FALSE installing the source package ‘flextable’ trying URL 'https://cran.rstudio.com/src/contrib/flextable_0.4.2.tar.gz' Content type 'application/x-gzip' length 135276 bytes (132 KB) ======

Can't install flextable

安稳与你 提交于 2019-12-02 02:45:10
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 binary version available but the source version is later: binary source needs_compilation flextable 0.4.0 0.4.2 FALSE installing the source package ‘flextable’ trying URL 'https://cran.rstudio.com/src/contrib/flextable_0.4.2.tar.gz' Content type 'application/x-gzip' length 135276 bytes (132 KB) ================================================== downloaded 132 KB Warning in strptime(xx, f <- "%Y-%m-%d