[R] Tables from Rmarkdown to Word Document - using huxtables
ru|pb@rr@d@@ @end|ng |rom @@po@pt
Wed Dec 11 16:41:30 CET 2019
This works for me:
hx <- iris %>%
summarise_if(is.numeric, mean) %>%
set_bold(1, , TRUE) %>%
set_bottom_border(1, , 1) %>%
set_col_width(1:5, 0.99) %>%
quick_docx(hx, file = "test.docx")
There are ways of doing the same without pipes, those functions don't
have the prefix 'set_'. But I believe that what's important is function
Hope this helps,
Às 11:37 de 11/12/19, Ashim Kapoor escreveu:
> Dear All,
> I am reading this :-
> I quote from the above:
> If you want to create Word or Powerpoint documents, install the flextable
> package <https://cran.r-project.org/package=flextable> from CRAN. Huxtables
> can then be automatically printed in Word documents. Or you can convert
> them to flextable objects and include them in Word or Powerpoint documents.
> My query is how do I do the former ? How do I do this ---> Huxtables can
> then be automatically printed in Word documents.
> I do understand how to do this ---> Or you can convert them to flextable
> objects and include them in Word or Powerpoint documents.
> Thank you,
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help