This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
n <- 100
x <- rnorm(n)
y <- 2*x + rnorm(n)
out <- lm(y ~ x)
library(xtable)
tab <- xtable(summary(out)$coef, digits=c(0, 2, 2, 1, 2))
print(tab, type="html")
## <!-- html table generated in R 3.5.0 by xtable 1.8-3 package -->
## <!-- Mon Sep 24 13:28:49 2018 -->
## <table border=1>
## <tr> <th> </th> <th> Estimate </th> <th> Std. Error </th> <th> t value </th> <th> Pr(>|t|) </th> </tr>
## <tr> <td align="right"> (Intercept) </td> <td align="right"> -0.01 </td> <td align="right"> 0.10 </td> <td align="right"> -0.1 </td> <td align="right"> 0.92 </td> </tr>
## <tr> <td align="right"> x </td> <td align="right"> 1.93 </td> <td align="right"> 0.09 </td> <td align="right"> 21.2 </td> <td align="right"> 0.00 </td> </tr>
## </table>