Corrected R code to make it Bill Venables proofed :-)