R:table1输出 [英] R: table1 output

查看:342
本文介绍了R:table1输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前,我找到了table1库来获取漂亮的表.

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

唯一的问题(对我而言),其输出是HTML表.我正在使用rtf库将R表导出到word,但是我不知道如何将此输出表(HTML)导出到word.

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 .

我想知道是否存在获得不同输出的可能性.或以另一种方式转换为R表.我没有使用R-studio.

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.

谢谢.

library(table1)

table1(~mpg| carb*am,data = mtcars)

推荐答案

感谢@ r2evans提供的信息,我可以获得一个R表,也许我丢失了一点格式,但是用rtf导出到word时还可以库:

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))

这篇关于R:table1输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆