knitr::opts_chunk$set(echo=FALSE)
in the setup, this will make code chunks hidden in printout.library(knitr) purl("/path/to/your/homework.Rmd")
When creating multiple graphs try to combine ones used for the same problem. You can do this with the following code:
library(gridExtra)
p1 <- ggplot()
p2 <- ggplot()
grid.arrange(p1,p2, ncol=?, nrow=?)
Fill the ?
in with appropriate numbers.tidy()
function to combine results into one table.summary()
of regression models, use tidy()
to extract coefficients and glance()
to extract model fit information.