added R package installation code as provided in issue #7