Debian Codegraph @

inst/doc/mtable-html.R

raw
1 ## ----echo=FALSE,message=FALSE-------------------------------------------------
2 knitr::opts_chunk$set(comment=NA,
3 fig.align="center",
4 results="markup")
5
6 ## ----message=FALSE------------------------------------------------------------
7 library(memisc)
8 lm0 <- lm(sr ~ pop15 + pop75, data = LifeCycleSavings)
9 lm1 <- lm(sr ~ dpi + ddpi, data = LifeCycleSavings)
10 lm2 <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
11
12 ## -----------------------------------------------------------------------------
13 mtable123 <- mtable("Model 1"=lm0,"Model 2"=lm1,"Model 3"=lm2,
14 summary.stats=c("sigma","R-squared","F","p","N"))
15
16 ## ----comment=NA---------------------------------------------------------------
17 mtable123 <- relabel(mtable123,
18 "(Intercept)" = "Constant",
19 pop15 = "Percentage of population under 15",
20 pop75 = "Percentage of population over 75",
21 dpi = "Real per-capita disposable income",
22 ddpi = "Growth rate of real per-capita disp. income"
23 )
24
25 ## ----results='asis'-----------------------------------------------------------
26 show_html(mtable123)
27