library(knitr) n <- 100 x <- rnorm(n) y <- 2*x + rnorm(n) out <- lm(y ~ x) kable(summary(out)$coef, digits=2)