Basic R code - good for teaching and learning