Updated R code to run with R-3.0.3 (Warm Puppy) and updated libraries.