【发布时间】:2017-03-25 06:10:38
【问题描述】:
library(htmlTable)
library(tidyverse)
library(ggmosaic) for "happy" dataset
我想创建一个函数,为数据集中的所有分类变量创建频率表,然后为每个变量生成 htmlTables。但是,通过使用 purrr::map,这些表在一个列表中。如何使用 htmlTable 生成表格?或者有什么更好的包可以生成类似的发布表?我想我需要拆分列表或使用额外的 purrr::map 函数?帮助将不胜感激...
Something like this...
FUN<-function(data){
TAB<-happy%>%select_if(is.factor)%>%
map(table)
TABLES<-htmlTable(TAB)
return(TABLES)
}
【问题讨论】: