library(ggplot2)
dd <- setNames(dat, c("x","y")) fit <- lm(y~x, data=dd)
summary(fit)
out <- confint(fit, level=conflevel) rownames(out) <- c("Intercept", "slope") pander::pandoc.table(out)
ggplot(dd, aes(x=x, y=y)) + geom_point() + geom_smooth(method="lm") + xlab(colnames(dat)[1]) + ylab(colnames(dat)[2]) + ggtitle(sprintf("Plot of %s vs %s.", colnames(dat)[2], colnames(dat)[1]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.