Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: table1 output

Tags:

html-table

r

Some days ago I found table1 library to get nice tables.

The only one problem (for me), its that output is a HTML table. I am using rtf library to export R table to word, but I dont know how export this output table (HTML) to word .

I wonder if exist some posibilty of get a different output. Or a different way to convert to R table. I am no using R-studio.

Thanks in advance.

library(table1)

table1(~mpg| carb*am,data = mtcars)
like image 662
Rodrigo_BC Avatar asked Dec 22 '25 18:12

Rodrigo_BC


1 Answers

Thanks to @r2evans for the information, I could get a R table, maybe I lost a little bit the format but is ok when I export to word with rtf library:

library(rvest)
library(table1)

tbl_1=table1(~mpg| carb*am,data = mtcars)
as.data.frame(read_html(tbl_1) %>% html_table(fill=TRUE))
like image 117
Rodrigo_BC Avatar answered Dec 24 '25 08:12

Rodrigo_BC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!