Combining several regression tables into one for use in xtable with Sweave in R

后端 未结 6 1367
广开言路
广开言路 2020-12-29 13:19

xtable in Sweave works awesome, but does one table per regression. You can feed it a data frame, too, so I have been manually rbinding

6条回答
  •  心在旅途
    2020-12-29 13:54

    Your code threw errors for me at the dcast call, so I simply read in the output that you offered and adjusted the colnames to match up. This code produces a well formed pdf file on my system after passing it through my LaTex processor. (I assume you have an appropriate LaTeX installation if you are already using Sweave.)

    require(Hmisc)
    latex(df.res)
    

    When I passed the example in help(lmList) in the lme4 package latex() also produce a fairly large and unweildy 4 page display that would need some adjustments to widen the page on my machine but may also be worth examination.

    require(lme4)
    (fm1 <- lmList(Reaction ~ Days | Subject, sleepstudy))
    latex(fm1)
    

提交回复
热议问题