Skip to content

Instantly share code, notes, and snippets.


Selva Prabhakaran selva86

View GitHub Profile
daroczig / memisc_and_pander.R
Last active Jan 24, 2018
Multiple regression models in a markdown table with memisc and pander
View memisc_and_pander.R
m1 <- lm(mpg ~ hp, data = mtcars)
m2 <- lm(mpg ~ hp + drat, data = mtcars)
m3 <- lm(mpg ~ hp + drat + factor(gear), data = mtcars)
library(pander); library(memisc)
panderOptions('table.alignment.rownames', 'left')
mtable(m1, m2, m3,
summary.stats=c('N', 'R-squared', 'F')),
'(Intercept)' = 'Constant',