In this post I’ll briefly introduce how to use ggplot2 (ggplot), which by default makes nicer looking plots than the standard R plotting functions.
The first thing to know is that ggplot requires data frames work properly. 413 more words
This is simple example code to display side-by-side lattice plots or ggplot2 plots, using the mtcars dataset that comes with any R installation. We will display a scatterplot of miles per gallon (mpg) on car weight (wt) next to another scatterplot of the same data, but using different colors by number of engine cylinders (cyl, treated as factor) and adding a smooth line (under the type option). 261 more words
As many of you may know, I teach statistics at the University of Utah. Below is a post about how industries based on chance events, such as casinos or insurance companies, are able to guarantee a profit. 1,151 more words