added some great new R code

check it out!