n <- 100
x <- rnorm(n)
y <- 2 * x + rnorm(n)
out <- lm(y ~ x)
kable(summary(out)$coef, digits = 2)
|id | Estimate| Std. Error| t value| Pr(>|t|)| |:————|———:|———–:|——–:|———:| |(Intercept) | -0.08| 0.1| -0.81| 0.42| |x | 2.01| 0.1| 20.70| 0.00|
n <- 100
x <- rnorm(n)
y <- 2 * x + rnorm(n)
out <- lm(y ~ x)
kable(summary(out)$coef, digits = 2, format = "html")
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| (Intercept) | -0.17 | 0.09 | -1.92 | 0.06 |
| x | 1.99 | 0.09 | 21.75 | 0.00 |
n <- 100
x <- rnorm(n)
y <- 2 * x + rnorm(n)
out <- lm(y ~ x)
kable(summary(out)$coef, digits = 2)
## |id | Estimate| Std. Error| t value| Pr(>|t|)|
## |:------------|---------:|-----------:|--------:|---------:|
## |(Intercept) | -0.11| 0.1| -1.19| 0.24|
## |x | 2.02| 0.1| 20.34| 0.00|
sessionInfo()
## R version 3.0.2 (2013-09-25)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2] LC_CTYPE=English_United States.1252
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C
## [5] LC_TIME=English_United States.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] knitr_1.5
##
## loaded via a namespace (and not attached):
## [1] evaluate_0.5.1 formatR_0.10 stringr_0.6.2 tools_3.0.2