fix options
fix R code
Merge pull request #30 from teharrison/master

fix options and r function