Tutorial by Examples

To install and load the current stable version of ggplot2 for your R installation use: # install from CRAN install.packages("ggplot2") To install the development version from github use # install.packages("devtools") devtools::install_github("hadley/ggplot2") ...
We show a plot similar to the showed at Linear regression on the mtcars dataset. First with defaults and the with some customization of the parameters. #help("mtcars") fit <- lm(mpg ~ wt, data = mtcars) bs <- round(coef(fit), 3) lmlab <- paste0("mpg = ", bs[1], ...

Page 1 of 1