huxtable 做表
library(huxtable)
table1 <- cbind.data.frame(mod$mchoice, mod2$mchoice)
table1 %>%
as_hux(add_colnames = FALSE) %>%
set_number_format(2) %>%
map_text_color(by_cols("darkred", "blue", "darkgreen")) %>%
add_colnames("Criteria") %>%
set_header_rows(1, TRUE) %>%
add_rownames() %>%
set_bottom_border(row = c(1,7), col = everywhere) %>%
set_top_border(row=1,col = everywhere) %>%
set_bold(1, everywhere) %>%
style_headers(bold = TRUE, text_color = "red") %>%
set_caption('(#tab:mchoicenyspatial) Model choice criteria for various models fitted to the nyspatial data set.')
评论
发表评论