new r function
Merge pull request #50 from teharrison/master

new r function