added part of R interface
Merge pull request #4 from sgn11/master

added part of R interface (not working)