Chris Grandin's R code for iScam