Adds R implementation.