在这篇文章中,我将概述最常用的包和博客,其中包含从不太直接的对象生成latex表的代码。请随意添加任何我错过的,和/或给提示,提示和小技巧,如何用R生成漂亮的乳胶表。
包:
xtable : for standard tables of most simple objects. A nice gallery with examples can be found here. memisc : tool for management of survey data, contains some tools for latex tables of (basic) regression model estimates. Hmisc contains a function latex() that creates a tex file containing the object of choice. It is pretty flexible, and can also output longtable latex tables. There's a lot of info in the help file ?latex miscFuncs has a neat function 'latextable' that converts matrix data with mixed alphabetic and numeric entries into a LaTeX table and prints them to the console, so they can be copied and pasted into a LaTeX document. texreg package (JSS paper) converts statistical model output into LaTeX tables. Merges multiple models. Can cope with about 50 different model types, including network models and multilevel models (lme and lme4). reporttools package (JSS paper) is another option for descriptive statistics on continuous, categorical and date variables. tables package is perhaps the most general LaTeX table making package in R for descriptive statistics stargazer package makes nice comparative statistical model summary tables
博客和代码片段
Paul Johnson的outreg函数在Latex中为回归的输出提供了类似stata的表。这个很好用。 正如在前面的问题中所给出的,有一个代码片段用于为lme4对象调整memisc包。
相关问题:
R/LaTeX表创建包的建议 Rreport/LaTeX质量输出包 使用xtable对latex输出的表进行排序 有办法从lme4 mer模型拟合对象产生一个LaTeX表吗? R data.frame与堆叠指定标题乳胶输出与xtable 从R自动向latex快速添加表,使用公式语言提供非常灵活和有趣的语法