fixed a few minor errors in r code.
updated readme.md