added R tutorial docs
corrected add for tests