updated R docs and tests
fixed data check