Skip to content

Instantly share code, notes, and snippets.

View swihart's full-sized avatar

Bruce Swihart swihart

View GitHub Profile
@swihart
swihart / gist:ae24cb9db3a22819ab5b629b5a0bd850
Last active November 23, 2016 19:00
get RStudio to download packages
options(repos=structure(c(CRAN="http://cran.us.r-project.org")))
Then do it. Sometimes need to do
install.packages(pkg-name, dependencies=TRUE)
source: http://stackoverflow.com/a/29945487/2727349
@swihart
swihart / tables in knitr
Created February 5, 2015 16:50
three examples from Karl Broman's Reproducible Research class
## from http://kbroman.org/Tools4RR/assets/lectures/03_knitr_Rmd.pdf
Tables
```{r kable}
x <- rnorm(100)
y <- 2*x + rnorm(100)
out <- lm(y ~ x)
coef_tab <- summary(out)$coef